This App is No Longer Maintained. Visit the Replacement at StrokesPlus.net

StrokesPlus Forum
                       
StrokesPlus Forum
Home | Profile | Active Topics
Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Feature Updates
 Existing Features
 [CHANGED] sp_after_action Functionality
 Forum Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Rob

USA
2615 Posts

Posted - 06/11/2012 :  13:52:24  Show Profile  Visit Rob's Homepage
Removed in 1.9.7:

sp_after_action - Some users were having script errors, but I was not able to reproduce, so removing for now.


Reinstated in 1.9.8, but only functions if Allow After Action Script* (may cause script errors) is enabled in Preferences.

For some people, this seems to cause Lua script errors; the best guess I have at this point is that it's some kind of locale issue where there are characters in the script that I don't get...but it's just a guess. If you enable this and get script errors, you'll just have to disable the option..but send me any info (OS, version, locale, language, keyboard layout, etc.) that may be useful in fixing this properly.

Andreasvb

Sweden
46 Posts

Posted - 06/11/2012 :  15:55:07  Show Profile
Think I'll stay on 1.9.6 atm.

I made a text display when making a gesture.
Not sure if it will work with no delay of the gesture without the after-function.

--Enter any Lua script that you'd like always executed when StrokesPlus loads, or when you click Reload Config.

function sp_before_action(gnm, gsx, gsy, gex, gey, gwd, gapp, gact)
	if gact == "Chrome TM" then
	else
		acActivateWindow(nil, gsx, gsy)
	end
end

function sp_after_action(gnm, gsx, gsy, gex, gey, gwd, gapp, gact)
	act_len = string.len(gact)
	acDisplayText(gact, "zeroes two", 80, 255, 0, 200, 450, 960-act_len*30, 300)
end

Edited by - Andreasvb on 06/11/2012 15:55:52
Go to Top of Page

Rob

USA
2615 Posts

Posted - 06/11/2012 :  16:14:29  Show Profile  Visit Rob's Homepage
I simply don't understand what was happening to those 2 (reported) people with the sp_after_action script just being present in the code. My best guess is some kind of locale issue as I know one is in China..not sure if some odd character is getting appended (like some other kind of line feed or something) after their action script (to which the Lua for the after function was appending in S+ code).

I may have to make it an experimental feature, defaulted to off, to enable the sp_after_action functionality. The only other option (without being able to identify the root cause) is to load the standard vars and sp_after_action stuff into an extra call to the Lua state, but I'm not going to do that as it would add significant overhead/processing time to every single action execution...so I'm stumped and unable to reproduce.

Will likely just add an option for now, but going to see what I can find out first.
Go to Top of Page

Rob

USA
2615 Posts

Posted - 06/11/2012 :  20:32:25  Show Profile  Visit Rob's Homepage
Added it back in 1.9.8 via checking the Allow After Action Script* (may cause script errors) option in Preferences; it's OFF by default.
Go to Top of Page
  Previous Topic Topic Next Topic  
 Forum Locked
 Printer Friendly
Jump To:
StrokesPlus Forum © 2011-2018 Rob Yapchanyk Go To Top Of Page
Snitz Forums 2000