Scripting Bugs

Things you’d like to miss in the future...
jacky
XYwiki Master
Posts: 3106
Joined: 23 Aug 2005 22:25
Location: France
Contact:

Re: Tabs are getting messed up

Post by jacky »

jacky wrote:Well, I found a way to get things (Tabs) pretty messed up it seems !

It invoves cycling through tabs with delay, and Finding Tabs. Cycling though tabs, at first with delay so List doesn't get updated, and without delay for the last one so List gets updated; and then moving back to the start point. And it seems important that at least one tab in the mix is a Finding Tab.

Doing that somehow gets tabs in the middle to get their location confused, and that even when when they were (home) locked. Finding Tab may show locations, Browsing tab may show search results, or just other locations even though they're not their locked location (or in their home zone when home locked)...

So yeah, it's quite of a mess.

Code: Select all

// Miscellaneous / Focus Functions / Cycle Tabs Forward, Delay Browsing
 #1038;
 // Miscellaneous / Focus Functions / Cycle Tabs Forward
 #1018;
 // Miscellaneous / Focus Functions / Cycle Tabs Backward, Delay Browsing
 #1039;
 // Miscellaneous / Focus Functions / Cycle Tabs Backward
 #1019;
hmm.. so it seems things have changed here, it still doesn't work as expected, but now the command Cycle with Delay don't ever refresh the List, like ever, after a cycle wthout delay was trigger right afte a cycle w/delay (and before delay was over, and List got refreshed)

Try this: Ctrl+PageDown and right after (before List refresh) Ctrl+Tab

Now your Cycle w/delay (Ctrl+PageUp/PageDown) don't work anymore (List never gets refreshed).


Also, not related, but command sel gives me an error #5: "Invalid Procedure Or Argument" almost every time: sel 1; sel 2,3; sel a; sel f;
Note that sel; or sel [a*]; works fine though.

I'm also unsure of how I did it, but at some point a script that was only command write (::write) would get me an error like it was a recursive script, and so was ended there... and I think I got that same error for a call ot sel (like ::sel i;) But again, can't reproduce this ATM.
Proud XYplorer Fanatic

jacky
XYwiki Master
Posts: 3106
Joined: 23 Aug 2005 22:25
Location: France
Contact:

Post by jacky »

Adding on that, two things:

- A script like "sel 1,0;" will get the error #5 every time, but when done manually (typed in Go to) I get your popup asking me to copy or not to clipboard; when it's from an item clicked on Catalog or using UDC, it's a crash of XY !

- Executing that script manually (Go to), and then clicking on Catalog item or trigerring an UDC with that exact same script gets me the error "The current script appears to be recursive! -- It is terminated now."
Proud XYplorer Fanatic

PeterH
Posts: 2785
Joined: 21 Nov 2005 20:39
Location: Germany

Post by PeterH »

...shouldn't it be a quoted string: sel "1,0"; :?:
For the comma?

jacky
XYwiki Master
Posts: 3106
Joined: 23 Aug 2005 22:25
Location: France
Contact:

Post by jacky »

PeterH wrote:...shouldn't it be a quoted string: sel "1,0"; :?:
For the comma?
No, the coma is a parameter separator ! It should be if the first param was to be "1,0" but this isn't the case, 1 is the first param, and 0 the second one. If anything it should be ::sel "1","0";
Proud XYplorer Fanatic

msalvatori
Posts: 33
Joined: 25 Aug 2007 18:39

Post by msalvatori »

admin wrote:No. You have to quote any argument that contains commas or semicolons (since they are separators in scripting). So you should do Rename re, "^a{1 2} ... $"
Thank you. I moved your syntax rules to the top of my "cheat sheet" and, to spare myself future grief, will always quote re expressions.

PeterH
Posts: 2785
Joined: 21 Nov 2005 20:39
Location: Germany

Post by PeterH »

You are right - my mistake!
Missed the (now unneccessary) space behind comma, and so interpreted it wrongly as 1 operand... :oops:

admin
Site Admin
Posts: 60567
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Tabs are getting messed up

Post by admin »

jacky wrote:
jacky wrote:Well, I found a way to get things (Tabs) pretty messed up it seems !

It invoves cycling through tabs with delay, and Finding Tabs. Cycling though tabs, at first with delay so List doesn't get updated, and without delay for the last one so List gets updated; and then moving back to the start point. And it seems important that at least one tab in the mix is a Finding Tab.

Doing that somehow gets tabs in the middle to get their location confused, and that even when when they were (home) locked. Finding Tab may show locations, Browsing tab may show search results, or just other locations even though they're not their locked location (or in their home zone when home locked)...

So yeah, it's quite of a mess.

Code: Select all

// Miscellaneous / Focus Functions / Cycle Tabs Forward, Delay Browsing
 #1038;
 // Miscellaneous / Focus Functions / Cycle Tabs Forward
 #1018;
 // Miscellaneous / Focus Functions / Cycle Tabs Backward, Delay Browsing
 #1039;
 // Miscellaneous / Focus Functions / Cycle Tabs Backward
 #1019;
hmm.. so it seems things have changed here, it still doesn't work as expected, but now the command Cycle with Delay don't ever refresh the List, like ever, after a cycle wthout delay was trigger right afte a cycle w/delay (and before delay was over, and List got refreshed)
These delay functions don't work well in scripting because they test whether any keys are pressed. But why would one use them in scripting anyway?
jacky wrote:Try this: Ctrl+PageDown and right after (before List refresh) Ctrl+Tab

Now your Cycle w/delay (Ctrl+PageUp/PageDown) don't work anymore (List never gets refreshed).
Yes, I could fix that one.

jacky wrote:Also, not related, but command sel gives me an error #5: "Invalid Procedure Or Argument" almost every time: sel 1; sel 2,3; sel a; sel f;
Note that sel; or sel [a*]; works fine though.

I'm also unsure of how I did it, but at some point a script that was only command write (::write) would get me an error like it was a recursive script, and so was ended there... and I think I got that same error for a call ot sel (like ::sel i;) But again, can't reproduce this ATM.
Fixed as well.

jacky
XYwiki Master
Posts: 3106
Joined: 23 Aug 2005 22:25
Location: France
Contact:

Re: Tabs are getting messed up

Post by jacky »

admin wrote:These delay functions don't work well in scripting because they test whether any keys are pressed. But why would one use them in scripting anyway?
Yeah, well I just tried using them cause there's no command to activate a tab (for now), so I just tried using those commands instead, and the delay was to avoid refreshing List for each tab while reaching the one I was aiming at...
Guess I'll have to wait for v7 and the "showtab" or whatever it'll be called ;)
admin wrote:Fixed as well.
Great! That sel-bug is annoying not (only) cause it gets XY to crash, but because I can't use some of my often-used scripts...
Proud XYplorer Fanatic

admin
Site Admin
Posts: 60567
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Tabs are getting messed up

Post by admin »

jacky wrote:Guess I'll have to wait for v7 and the "showtab" or whatever it'll be called ;)
Just tell me why you select a tab via scripting. :?

jacky
XYwiki Master
Posts: 3106
Joined: 23 Aug 2005 22:25
Location: France
Contact:

Re: Tabs are getting messed up

Post by jacky »

admin wrote:
jacky wrote:Guess I'll have to wait for v7 and the "showtab" or whatever it'll be called ;)
Just tell me why you select a tab via scripting. :?
Well, it's because it's a Finding Tab, that runs a specific File Find operation, and I'd like to have that search run, then get info about results in clipboard (ideally a report, but for now I'd use file path/names cause my reports are set for HTML files so it doesn't work that good here...) and then go back to the default tab, and show me results.
Proud XYplorer Fanatic

admin
Site Admin
Posts: 60567
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Post by admin »

jacky wrote:- Executing that script manually (Go to), and then clicking on Catalog item or trigerring an UDC with that exact same script gets me the error "The current script appears to be recursive! -- It is terminated now."
:? Can't reproduce.

jacky
XYwiki Master
Posts: 3106
Joined: 23 Aug 2005 22:25
Location: France
Contact:

Post by jacky »

admin wrote:
jacky wrote:- Executing that script manually (Go to), and then clicking on Catalog item or trigerring an UDC with that exact same script gets me the error "The current script appears to be recursive! -- It is terminated now."
:? Can't reproduce.
Well, I can, using a fresh 6.80.0080:
- Ctrl+G, and type ::sel 1
- Say Yes to execute, you get the error 5
- Show Catalog, New Category, New Item with location: ::sel 1
- Click the item, yes to execute, there you go! (recursive script)

Now maybe when you fixed the error 5 thing, this one vanished as well...
Proud XYplorer Fanatic

admin
Site Admin
Posts: 60567
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Post by admin »

jacky wrote:
admin wrote:
jacky wrote:- Executing that script manually (Go to), and then clicking on Catalog item or trigerring an UDC with that exact same script gets me the error "The current script appears to be recursive! -- It is terminated now."
:? Can't reproduce.
Well, I can, using a fresh 6.80.0080:
- Ctrl+G, and type ::sel 1
- Say Yes to execute, you get the error 5
- Show Catalog, New Category, New Item with location: ::sel 1
- Click the item, yes to execute, there you go! (recursive script)

Now maybe when you fixed the error 5 thing, this one vanished as well...
So it is!

jacky
XYwiki Master
Posts: 3106
Joined: 23 Aug 2005 22:25
Location: France
Contact:

Post by jacky »

That new multi-line support for UDC script is really nice, however now we can't do script outside of that new window (button Edit), cause pressing Apply just restore whatever was there before (or "New" when creating a new one)
Proud XYplorer Fanatic

j_c_hallgren
XY Blog Master
Posts: 5824
Joined: 02 Jan 2006 19:34
Location: So. Chatham MA/Clearwater FL
Contact:

Post by j_c_hallgren »

So I've not been on the bleeding edge in trying scripting, but in conjunction with attempting to update a wiki page to match newest beta, I tried a couple of things...thus...I created a "Run Script" entry with 'write', and when executed, I pasted the following into entry box:

Code: Select all

"Show date : date" msg <dyyyy-mm-dd> 
"Show time : time" msg <dhh:nn:ss> 
When I press Enter, nothing happens...If I have the same exact script entered as another entry on "Run Script" directly, it works...am I missing something or is it bug?
jacky wrote:That new multi-line support for UDC script is really nice, however now we can't do script outside of that new window (button Edit), cause pressing Apply just restore whatever was there before (or "New" when creating a new one)
Does that explain why, when I tried to add a new script, it just keep changing back to "New" no matter what I typed in Script entry line?

Also, when I first attempted to add 'write' as first/only Run Script, somehow I ended up with an empty box that showed instead of the script.
Still spending WAY TOO much time here! But it's such a pleasure helping XY be a treasure!
(XP on laptop with touchpad and thus NO mouse!) Using latest beta vers when possible.

Post Reply