[1.1.4] Win: popFile only allows sikuli folders to be seleted --- save script first or say ESC to script-save dialog --- fixed 2018-09-21

Bug #1793408 reported by Ryan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SikuliX
Fix Released
Critical
RaiMan

Bug Description

When I write a Sikuli script to open a dialog to let me choose a folder location, the IDE will only allow me to choose a sikuli folder.

This is my script:
------
test = popFile("Choose a folder")

print(test)
------

REPRO:

1. Load Sikuli 1.1.4 (2018-09-19_07:17) onto a Win 10 64bit machine
2. Download the Jython-standalone-2.7.0.JAR and place it in the AppData/Roaming/Sikulix/Extensions folder
          (unsure if this is needed)
3. Open Sikuli and write a script as described above

RESULT:

Selecting a non-sikuli folder pops a message saying 'This is not a valid sikuli script'.

EXPECTED:

The user would be able to select any folder

Revision history for this message
Ryan (ryan-g2) wrote :

Digging through the Answers backlog, I found a question that was solved back in 2016:

https://answers.launchpad.net/sikuli/+question/294059

I didn't see a related bug to re-open.

RaiMan (raimund-hocke)
summary: - popFile on Win10 only allows sikuli folders to be seleted
+ [1.1.4] Win: popFile only allows sikuli folders to be seleted
Changed in sikuli:
status: New → In Progress
importance: Undecided → High
assignee: nobody → RaiMan (raimund-hocke)
milestone: none → 1.1.4
Revision history for this message
RaiMan (raimund-hocke) wrote : Re: [1.1.4] Win: popFile only allows sikuli folders to be seleted --- save script first or say ESC to script-save dialog

If you run this script in an undefined tab (not yet saved), you first get the script-save dialog.

This might have irritated you ;-)

If you get over this dialog (either dismiss or handle), then you get your intended file dialog.

Changed in sikuli:
status: In Progress → Invalid
summary: - [1.1.4] Win: popFile only allows sikuli folders to be seleted
+ [1.1.4] Win: popFile only allows sikuli folders to be seleted --- save
+ script first or say ESC to script-save dialog
Revision history for this message
Ryan (ryan-g2) wrote :

Hi RaiMan,

I went back and recreated my one line script from above.

I made sure to save the script (I clicked the Run button, then saved the script as a new sikuli file). The popFile dialog then appeared (I see that the dialog is titled what I specified in my script), when I choose a non-sikuli folder from here, I see the error originally reported.

I thought maybe I would have to add 'from sikuli import *', but after adding that line I still see the error.

Revision history for this message
RaiMan (raimund-hocke) wrote :

thanks for testing. I will look into it again.

Changed in sikuli:
status: Invalid → In Progress
Revision history for this message
RaiMan (raimund-hocke) wrote :

please test with the latest build from today

Changed in sikuli:
status: In Progress → Fix Committed
importance: High → Critical
summary: [1.1.4] Win: popFile only allows sikuli folders to be seleted --- save
- script first or say ESC to script-save dialog
+ script first or say ESC to script-save dialog --- fixed 2018-09-21
Revision history for this message
Ryan (ryan-g2) wrote :

Tested against 1.1.4(2018-09-21-17:33)

This now works - thanks RaiMan!

RaiMan (raimund-hocke)
Changed in sikuli:
status: Fix Committed → Fix Released
milestone: 1.1.4 → 2.0.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.