Rank: Newbie
Groups: Approved
Joined: 8/9/2020(UTC) Posts: 4 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 2:26:20 PM(UTC)
| Reason: Not specified |
|
|
|
|
Rank: Administration
Groups: Translators, Members, Administrators Joined: 1/11/2018(UTC) Posts: 1,382 Location: Tampa, FL Thanks: 28 times Was thanked: 431 time(s) in 364 post(s)
|
See this link for the writing out SendKeys: Microsoft SendKeys usagesp.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.
|
1 user thanked Rob for this useful post.
|
|
|
Rank: Administration
Groups: Translators, Members, Administrators Joined: 1/11/2018(UTC) Posts: 1,382 Location: Tampa, FL Thanks: 28 times Was thanked: 431 time(s) in 364 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 3:11:37 PM(UTC)
| Reason: Not specified
|
1 user thanked Rob for this useful post.
|
|
|
Rank: Newbie
Groups: Approved
Joined: 8/9/2020(UTC) Posts: 4 Thanks: 3 times
|
Originally Posted by: Rob See this link for the writing out SendKeys: Microsoft SendKeys usagesp.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. 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! |
|
|
|
|
Rank: Member
Groups: Approved
Joined: 11/17/2023(UTC) Posts: 16 Thanks: 4 times
|
Quote: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);
Hi Rob, I've always wondered about the usage of the part that comes after the path, i.e.: Code:"", "open", "normal", true, false, false)
I was trying to find an explanation online, but I couldn't find any. What do those values refer to? Sorry to take up your time and thanks for this great software!
|
|
|
|
Rank: Administration
Groups: Translators, Members, Administrators Joined: 1/11/2018(UTC) Posts: 1,382 Location: Tampa, FL Thanks: 28 times Was thanked: 431 time(s) in 364 post(s)
|
Each of those additional parameters are explained in the Script Help window under Operating System > RunProgram.
But the basically match many of the common options available under the .NET Process.Start method.
|
1 user thanked Rob for this useful post.
|
|
|
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.
Important Information:
The StrokesPlus.net Forum uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close