StrokesPlus Forum
StrokesPlus Forum
Home | Profile | Register | Active Topics
Members | Search | FAQ
 All Forums
 General Discussion
 General Discussion
 Desktop Actions with Windows in View?

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List

* Forum Code is ON
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

Check here to subscribe to this topic.

T O P I C    R E V I E W
Daniel Posted - 03/06/2018 : 16:21:51
I just wanted to say first that this software is awesome, I have been diving further into it and have been coming up with more complicated scripts to make life easier. It is all much more intuitive and simple to pick up than I thought it would be especially with the Info button to educate you with what all the variables are for each action.

Anyway, I searched to see if I could find an answer in the forums but couldn't immediately find one. I added "sp_before_action(gnm, gsx, gsy, gex, gey, gwd) - acActivateWindow(nil, gsx, gsy)" to my Global Lua tab so that it activates the action based on the mouse cursor rather than the current active window. I definitely prefer it this way, I was just wondering if it was possible to have Desktop Actions even if other windows are still showing. There are certain actions I would prefer not to have in the Global Actions category, but the Desktop actions only seem to work for me if every other window is minimized first. Is there something I can do to accomplish this?

Thanks in advance for any help
11   L A T E S T    R E P L I E S    (Newest First)
Rob Posted - 03/08/2018 : 13:10:48
I tested the above and it worked for me *shrug*

Yeah, it's still an alpha release, so there isn't any help yet, only these quick reference files.

But you can join the Discord server and myself or someone else will usually help you out pretty quickly:

I work from home, so I'm usually sitting at my desk anyway :)
Daniel Posted - 03/08/2018 : 13:04:45
Unfortunately that didn't seem to fix the issue but I'm not too worried about it so you need not worry or anything. I just made them Global Gestures and I doubt I would ever trigger them by accident.

I was going through and I was really liking it. I actually really like the tab to view gestures and the ability to manage all the extra patterns that you have trained. It isn't like I am super great in either Lua or JavaScript, but the OG StrokesPlus had the Available Actions dropbox along with the Info button to walk me through each script and what the variables are. I wasn't able to find that in So when I see a script like "sp.RunProgram(sp.ExpandEnvironmentVariables("%SystemRoot%")+"\\explorer.exe", "", "", "", false, false, false);" I have no idea what all the variables control. Really all I need to do is find a good reference library and I'll be good to go.
Rob Posted - 03/08/2018 : 03:21:29
Try changing the Desktop's definition to this:

Like I said, Windows treats the desktop in very different ways, which they can (and have) change at any time, since it's not really part of any defined API or standard.

Essentially, the desktop window owner class appears to change based on the state of other applications being shown. So the regular expression pattern "Progman|WorkerW" says to match if the owner class is "Progman" (Program Manager) or "WorkerW".

The reason I wanted to see the script was to determine if it required the desktop be the active window (e.g. sending keystrokes), which yours does not.

Regarding, I totally understand you finally getting a grasp on scripting in StrokesPlus (Lua) and not wanting to have to learn a new scripting language (Javascript/.NET). But I will say that StrokesPlus is no longer being maintained/enhanced. I will generally try to keep it functioning as Windows changes if it prevents StrokesPlus from working, but beyond that I'm not touching the code. Although, it's been working pretty well for years and has a large amount of functionality, so there really shouldn't be any reason it won't continue to do so. It does have a much smaller footprint than and will run on XP/Vista, but in the end I wanted to use a platform which makes user interface development substantially easier and support Unicode natively, which StrokesPlus does not (affects international users in certain functions).
Daniel Posted - 03/07/2018 : 20:38:27
I didn't think the script itself was relevant but just in case it was just a basic one for the example.

acRunProgram("c:\\windows\\explorer.exe","",0, 0, 500, 500, 2)
Daniel Posted - 03/07/2018 : 20:27:37
Yeah, I figured. OneDrive is silly. I have uploaded them elsewhere and edited the original post. Hopefully you can see them. I even switched browsers to confirm.
Rob Posted - 03/07/2018 : 20:13:10
They're only visible to you when you're logged in, but no one else sees them.
Daniel Posted - 03/07/2018 : 20:11:25
Sorry, I've never used OneDrive to embed photos before. I posted them and they worked. Came back to check on the thread and the links were broken, signed back into OneDrive to see what was happening and the pictures are back again. How annoying. I'll reupload them somewhere else shortly
Rob Posted - 03/07/2018 : 19:42:41
None of your images are showing, receive 403 access denied.

It's likely something about the desktop itself, as Window treats it as a special window in many ways, and it even can change how it is reported based on various states of other windows, etc.

Can you move those images to something like imgur and put the script of the action you're trying to execute here?
Daniel Posted - 03/07/2018 : 18:43:06
After this post I have downloaded the alpha and I might try and switch to that but I'm not really sure yet. I am just starting to get deeper into this one. So, I think I get what the problem is after Hard.Wired's post. Is it that the Desktop itself can't be selected as the "Active Window"? I'll attempt to re-explain the problem with an example scenario and visual aids.

As far as qualifiers I believe they are all still the ones that came by default. I'm trying to get a program to launch.

I have two open windows with the desktop visible at the bottom left.

I draw my gesture above the desktop in an attempt to launch my file explorer but it doesn't work.

However, If I minimized the visible windows, the gesture works just fine.

So, what I am trying to do is have it to where I have Desktop Gestures that continue to work even if windows are still visible. Is that something that can be done?
Hard.Wired Posted - 03/07/2018 : 13:52:14

It sounds like you want to be able to turn off the always activated "acActivateWindow(nil, gsx, gsy)" for some actions. My first suggestion is to make a global variable that you can use as a toggle to turn off the "acActivateWindow(nil, gsx, gsy)" command.
Rob Posted - 03/07/2018 : 10:34:41
I do generally follow what you're saying here, but I might need some more specifics so I can try to reproduce the steps. So if you can post some details like the Windows Desktop qualifiers (app definition), an action, what happens when windows are shown/or not, etc. Like a numbered list I can follow to make this happen, that will help a lot.

StrokesPlus Forum © 2011-2018 Rob Yapchanyk Go To Top Of Page
Snitz Forums 2000