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

 All Forums
 Feature Updates
 Requests
 acEnable()
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

DerGolo

Germany
10 Posts

Posted - 06/20/2016 :  16:59:09  Show Profile  Reply with Quote
Hi,

I use a screen capture app, "SnagIt". SnagIt does not work correctly when S+ is active since SnagIt only recognises one big windows all over the desktop (S+ capture ares) but the individual windows.

I would like do disable S+ by script, then perform the desired screen capture by invoking a special hotkey and after all - reenable S+. An expample:


acDisable()
acSendKeys("+^%7")
acEnable()


acDisable() is mandatory since acDisableCapture() does not solve the problem. All I nned now is the acEnable() which is not present right now but this would be perfectly solve my problem.

Thanks,
Golo

Rob

USA
2514 Posts

Posted - 06/20/2016 :  17:07:02  Show Profile  Visit Rob's Homepage  Reply with Quote
The class name of the gesture draw window is "STROKESPLUS". I'm on my phone, so I can't test, but you should be able to use acFindWindow, then minimize it, send your keys, then restore it. The reason there's no acEnable is because once you disable S+, it's disabled and isn't running to process scripts. You can also try to uncheck the preference to always keep gesture window on top, though you might also have to add a very slight delay at the start of your script to ensure S+ has had a chance to hide the gesture surface.
Go to Top of Page

DerGolo

Germany
10 Posts

Posted - 06/20/2016 :  17:22:32  Show Profile  Reply with Quote
Hi Rob,

your hint solved it perfect:

acMinimizeWindow(acFindWindow("STROKESPLUS",nil), nil, nil)
acSendKeys("+^%7")
acMaximizeWindow(acFindWindow("STROKESPLUS",nil), nil, nil)


Only formy understanding: When I used acDisable() and the acSendKeys afterwards, the acSendKeys was performed although S+ has been disabled the line before. In this case, an acEnable() would be performed, too - or did I get it wrong? The script is loaded to memory and executed before S+ is disabled to it will be performed regardless of S+ state; maybe.

Thanks,
Golo
Go to Top of Page

Rob

USA
2514 Posts

Posted - 06/20/2016 :  17:28:31  Show Profile  Visit Rob's Homepage  Reply with Quote
Technically you're right, but there's a 500ms delay before acDisable actually does its work, and that's only to let a script finish. The problem is that it's already in motion, so the disable code would end up firing after acEnable. Not to say it couldn't be worked through in the S+ code, but as far as it being more complicated than simply adding the new function. It's really a judgement call, telling the program to disable should really disable it immediately, which will be the case in the new version I'm working on. What probably makes more sense overall are some functions to hide the gesture surface as that actually addresses this problem and I haven't had anyone else need to disable then enable in the same script.
Go to Top of Page

DerGolo

Germany
10 Posts

Posted - 06/20/2016 :  17:32:45  Show Profile  Reply with Quote
Okay, I see this makes sense. It's 0:31 AM here in Germany right now so I will have a little nap. Thanks again and since the min/max works great, this feature request is obsolete :-)

Have a nice day,
Golo
Go to Top of Page

DerGolo

Germany
10 Posts

Posted - 05/22/2018 :  17:57:46  Show Profile  Reply with Quote
Hi Rob,

since your solution works great for single monitor setup, it does not in multi-monitor.

acMinimizeWindow(acFindWindow("STROKESPLUS",nil), nil, nil)

I assume there are more than one windows "STROKESPLUS" to be minimized but only the first one is. So on one monitor, the windows is minimized but not on all others. Do you have another idea how to deactivate all StrokesPlus Windows on all monitors and restore them short after?

Thanks a lot,
Golo

Edited by - DerGolo on 05/22/2018 17:59:46
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
StrokesPlus Forum © 2011-2018 Rob Yapchanyk Go To Top Of Page
Snitz Forums 2000