← Back to team overview

sikuli-driver team mailing list archive

[Question #672521]: Save file (JfileChooser) problem

 

New question #672521 on Sikuli:
https://answers.launchpad.net/sikuli/+question/672521

Hello...

I got this code:

	choose_save_file = JFileChooser()
	ret_save = choose_save_file.showSaveDialog(None)
	if ret_save == JFileChooser.APPROVE_OPTION:
		save_select = choose_save_file.getSelectedFile()
		file_path = save_select.getAbsolutePath()		
		file_directory = save_select.getCanonicalPath()		
		pathios = file_directory		
		final_file_name = File(file_path)
		file_out = FileOutputStream(final_file_name)

When I run it from sikuli ide and I save a file is working..
When I export my jar from sikuli ide option and run it, it's not saving the file..

The same is also for loading a file..

	if ret == JFileChooser.APPROVE_OPTION:
		fileoptions = chooseFile.getSelectedFile()
		pathios = fileoptions.getAbsolutePath()

		getProps = Properties()
		input = FileInputStream(pathios)
		getProps.load(input)
		check_collect_a.setText(getProps.getProperty("Test1"))
		get_check_collect = check_collect_a_enable.getText()
		check_remove_a_enable.setText(getProps.getProperty("Test2"))
                get_remove_ = check_remove_a_enable.getText()

I read something about policy file but seems not working when I extract my jar..
Please any help?????




-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.