StrokesPlus.net
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Patrick97  
#1 Posted : Thursday, June 3, 2021 3:44:35 PM(UTC)
Patrick97

Rank: Member

Reputation:

Groups: Approved
Joined: 5/18/2020(UTC)
Posts: 15

Thanks: 6 times
Hi everyone, I've just discovered this amazing software and I think it could help me so much with my work, but I am a newbie and I know very little about those things, so I have some questions, just in order to begin to understand the basics.

Which script should I use in order to create gestures for:

1) Opening a given folder (e.g.: D:\Data\2021)?
2) Starting a program (e.g.: C:\Program Files\Mozilla Firefox\firefox.exe)?

Moreover, is it possible to associate those actions with a given sound (e.g.: C:\D\Storage\__Audio\Desk bell.wav)?

Knowing these answers could let me start enjoying StrokePlus.net!

Thank you!
Rob  
#2 Posted : Thursday, June 3, 2021 4:35:22 PM(UTC)
Rob

Rank: Administration

Reputation:

Groups: Translators, Members, Administrators
Joined: 1/11/2018(UTC)
Posts: 1,044
United States
Location: Tampa, FL

Thanks: 22 times
Was thanked: 309 time(s) in 270 post(s)
Welcome!

Here's some stuff to get you going:

Code:
//Backslashes signal special characters, so you have
//to escape them to say you want the backslash itself
sp.Run("D:\\Data\\2021"); 

//sp.Run is almost just like the Windows Run dialog
sp.Run("C:\\Program Files\\Mozilla Firefox\\firefox.exe");

//Only works for .WAV files
sp.PlaySound("C:\\D\\Storage\\__Audio\\Desk bell.wav");
thanks 1 user thanked Rob for this useful post.
Patrick97 on 6/4/2021(UTC)
Patrick97  
#3 Posted : Friday, June 4, 2021 3:09:59 PM(UTC)
Patrick97

Rank: Member

Reputation:

Groups: Approved
Joined: 5/18/2020(UTC)
Posts: 15

Thanks: 6 times
Thank you so much for your precious tips: THEY WORK FLAWLESSLY!

I have few more questions (the answers to which are very fast and simple, I think):

A script for:

1) press "ALT" key + "S" key;

2) Press "CTRL" key + "A" key;

3) Minimizing the window currently on focus:
I had this script which worked with the previous version of StrokePlus, but it does not with this one:
acMinimizeWindow(nil, gsx, gsy)

In the end, a final question:

I had between the main command and the sound this line:
acDelay(50)
which I think applies a short delay after the main command and before the sound; is it a good thing or is it simply unnecessary?

I do hope to know the answers of those questions, because it is all you need to start enjoying this amazing software!
Rob  
#4 Posted : Friday, June 4, 2021 3:23:41 PM(UTC)
Rob

Rank: Administration

Reputation:

Groups: Translators, Members, Administrators
Joined: 1/11/2018(UTC)
Posts: 1,044
United States
Location: Tampa, FL

Thanks: 22 times
Was thanked: 309 time(s) in 270 post(s)
Regarding the Alt/Ctrl + letter, the easiest thing to do is click the Insert Hotkey button in the script editor toolbar - then you just press the key combination you want and click OK, the script will be inserted.

Re: Minimize
There are multiple ways to accomplish this:
Code:
// If using an action, where you want the window below where the gesture started
action.Window.Minimize();

//if you want to minimize the active window
sp.ForegroundWindow().Minimize();

//if you want to find a window by location (below gets the window located at 0,0 X,Y)
sp.WindowFromPoint(new Point(0,0)).Minimize();

There are others as well...but essentially, once you get a SystemWindow object, the .Minimize() method will do this.

Re: Delay
Up to you, only needed if there's a reason, in the new S+ you would use sp.Sleep(50)
thanks 1 user thanked Rob for this useful post.
Patrick97 on 6/4/2021(UTC)
Patrick97  
#5 Posted : Friday, June 4, 2021 4:35:31 PM(UTC)
Patrick97

Rank: Member

Reputation:

Groups: Approved
Joined: 5/18/2020(UTC)
Posts: 15

Thanks: 6 times
Thank you (TWICE!) for your ULTRAFAST answers!

I have already try all of them, and NO PROBLEM AT ALL (you must have been extremely clear: even I have understood what I had to do! ;-))) )

A BIG CIAO and GRAZIE from Italy!

This software is so amazing.... it saves a lot of time!!!

;-)
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.