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

Notification

Icon
Error

Options
Go to last post Go to first unread
Dauren  
#1 Posted : Sunday, August 9, 2020 6:57:34 AM(UTC)
Dauren

Rank: Newbie

Reputation:

Groups: Approved
Joined: 8/9/2020(UTC)
Posts: 4
Kazakhstan

Thanks: 3 times
And hello everyone, here's a question about shortkeys: How do i write shortkeys in the script? For example "win+E" to open explorer , just writing - sp.SendVKey(vk.RWIN+e"); didn't work though.

Second question is: how do i run executionable? Yes, i searched through forum before creating this topic/question. But the questions were about Windows executionables or opening a site in browser. Again, for example i tried - sp.RunProgram("steam.exe", "", "open", "normal", true, false, false);
But it seems it can't find the program (?) Anyway, thanks in advance!

Edited by user Sunday, August 9, 2020 8:26:20 AM(UTC)  | Reason: Not specified

UserPostedImage
Rob  
#2 Posted : Sunday, August 9, 2020 9:09:03 AM(UTC)
Rob

Rank: Administration

Reputation:

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

Thanks: 13 times
Was thanked: 155 time(s) in 134 post(s)
See this link for the writing out SendKeys: Microsoft SendKeys usage

sp.RunProgram is an explicit execute program call, meaning it's trying to open the open from whatever the current directory is (usually, StrokesPlus.net. You have to fully qualify the path and executable, escaping backslashes as well.

For example:
Code:
sp.RunProgram("C:\\Windows\\system32\\notepad.exe", "", "open", "normal", true, false, false);

However, you can also use sp.Run which just does the same thing that Start > Run does, so as long as steam.exe is something in the defined paths, it will run.
Code:
sp.Run("notepad");
thanks 1 user thanked Rob for this useful post.
Dauren on 8/9/2020(UTC)
Rob  
#3 Posted : Sunday, August 9, 2020 9:09:57 AM(UTC)
Rob

Rank: Administration

Reputation:

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

Thanks: 13 times
Was thanked: 155 time(s) in 134 post(s)
Also, the Insert Hotkey button in the script editor toolbar is an easy way to get the script for single key combinations.

SendKeys doesn't support the Win key, so use the appropriate VKey calls, example:
Code:
sp.SendModifiedVKeys([vk.LWIN], [vk.VK_E]);

Edited by user Sunday, August 9, 2020 9:11:37 AM(UTC)  | Reason: Not specified

thanks 1 user thanked Rob for this useful post.
Dauren on 8/9/2020(UTC)
Dauren  
#4 Posted : Sunday, August 9, 2020 9:20:24 AM(UTC)
Dauren

Rank: Newbie

Reputation:

Groups: Approved
Joined: 8/9/2020(UTC)
Posts: 4
Kazakhstan

Thanks: 3 times
Originally Posted by: Rob Go to Quoted Post
See this link for the writing out SendKeys: Microsoft SendKeys usage

sp.RunProgram is an explicit execute program call, meaning it's trying to open the open from whatever the current directory is (usually, StrokesPlus.net. You have to fully qualify the path and executable, escaping backslashes as well.

For example:
Code:
sp.RunProgram("C:\\Windows\\system32\\notepad.exe", "", "open", "normal", true, false, false);

However, you can also use sp.Run which just does the same thing that Start > Run does, so as long as steam.exe is something in the defined paths, it will run.
Code:
sp.Run("notepad");


Damn i've already tried script with the path, but it seems like i cracked up somewhere so it didn't work :/
Thank you as always!
UserPostedImage
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.