Is there a way to move arrow key to left on Windows Popup?
I am writing a script which will allow PowerShell to run in admin mode but when I run Set-ExecutionPolicy Bypass, Windows displays a popup and I use my left arrow key to move to the yes button and press enter.
The problem I am facing is that it does not move to the left or press enter when I run the script as follows.
RunWait PowerShell.exe -ExecutionPolicy Bypass -NoExit -Command "C:Users%A_UserName%DesktopScript.ps1";
Send {Left}
Sleep, 5000
Send {Enter}
I am expecting it to actually move to the OK button on the left and press enter but nothing actually happens.
autohotkey
add a comment |
I am writing a script which will allow PowerShell to run in admin mode but when I run Set-ExecutionPolicy Bypass, Windows displays a popup and I use my left arrow key to move to the yes button and press enter.
The problem I am facing is that it does not move to the left or press enter when I run the script as follows.
RunWait PowerShell.exe -ExecutionPolicy Bypass -NoExit -Command "C:Users%A_UserName%DesktopScript.ps1";
Send {Left}
Sleep, 5000
Send {Enter}
I am expecting it to actually move to the OK button on the left and press enter but nothing actually happens.
autohotkey
add a comment |
I am writing a script which will allow PowerShell to run in admin mode but when I run Set-ExecutionPolicy Bypass, Windows displays a popup and I use my left arrow key to move to the yes button and press enter.
The problem I am facing is that it does not move to the left or press enter when I run the script as follows.
RunWait PowerShell.exe -ExecutionPolicy Bypass -NoExit -Command "C:Users%A_UserName%DesktopScript.ps1";
Send {Left}
Sleep, 5000
Send {Enter}
I am expecting it to actually move to the OK button on the left and press enter but nothing actually happens.
autohotkey
I am writing a script which will allow PowerShell to run in admin mode but when I run Set-ExecutionPolicy Bypass, Windows displays a popup and I use my left arrow key to move to the yes button and press enter.
The problem I am facing is that it does not move to the left or press enter when I run the script as follows.
RunWait PowerShell.exe -ExecutionPolicy Bypass -NoExit -Command "C:Users%A_UserName%DesktopScript.ps1";
Send {Left}
Sleep, 5000
Send {Enter}
I am expecting it to actually move to the OK button on the left and press enter but nothing actually happens.
autohotkey
autohotkey
asked Jan 3 at 3:34
Singha22Singha22
32
32
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
- If you run PowerShell in admin mode your script needs also to be run
in this mode. - Unlike Run, RunWait will wait until the program (in
this case PowerShell.exe) finishes before continuing (= sending
commands to the popup window). To bypass this problem use SetTimer.
Thanks for the help. I figured out a solution to my problem by running the .ahk in Admin Mode and it worked like a gem. Thanks though!
– Singha22
Jan 4 at 1:20
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54016007%2fis-there-a-way-to-move-arrow-key-to-left-on-windows-popup%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
- If you run PowerShell in admin mode your script needs also to be run
in this mode. - Unlike Run, RunWait will wait until the program (in
this case PowerShell.exe) finishes before continuing (= sending
commands to the popup window). To bypass this problem use SetTimer.
Thanks for the help. I figured out a solution to my problem by running the .ahk in Admin Mode and it worked like a gem. Thanks though!
– Singha22
Jan 4 at 1:20
add a comment |
- If you run PowerShell in admin mode your script needs also to be run
in this mode. - Unlike Run, RunWait will wait until the program (in
this case PowerShell.exe) finishes before continuing (= sending
commands to the popup window). To bypass this problem use SetTimer.
Thanks for the help. I figured out a solution to my problem by running the .ahk in Admin Mode and it worked like a gem. Thanks though!
– Singha22
Jan 4 at 1:20
add a comment |
- If you run PowerShell in admin mode your script needs also to be run
in this mode. - Unlike Run, RunWait will wait until the program (in
this case PowerShell.exe) finishes before continuing (= sending
commands to the popup window). To bypass this problem use SetTimer.
- If you run PowerShell in admin mode your script needs also to be run
in this mode. - Unlike Run, RunWait will wait until the program (in
this case PowerShell.exe) finishes before continuing (= sending
commands to the popup window). To bypass this problem use SetTimer.
answered Jan 3 at 9:43
user3419297user3419297
5,1022714
5,1022714
Thanks for the help. I figured out a solution to my problem by running the .ahk in Admin Mode and it worked like a gem. Thanks though!
– Singha22
Jan 4 at 1:20
add a comment |
Thanks for the help. I figured out a solution to my problem by running the .ahk in Admin Mode and it worked like a gem. Thanks though!
– Singha22
Jan 4 at 1:20
Thanks for the help. I figured out a solution to my problem by running the .ahk in Admin Mode and it worked like a gem. Thanks though!
– Singha22
Jan 4 at 1:20
Thanks for the help. I figured out a solution to my problem by running the .ahk in Admin Mode and it worked like a gem. Thanks though!
– Singha22
Jan 4 at 1:20
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54016007%2fis-there-a-way-to-move-arrow-key-to-left-on-windows-popup%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown