Sign in to follow this  
Followers 0
Mamatha

Send() function doesn't send any special keys on windows 7 64 bit machine

11 posts in this topic

My code is like this:

Opt("WinTitleMatchMode", 2)

Opt("WinTextMatchMode", 2)

$file = "G:\Setup.exe"

ShellExecuteWait($file)

if @error then

Msgbox(0,"Can't find the installer","M1 installer not found")

exit

endif

WinWaitActive("M1 Setup")

Send("!n")

If i type alt-n manually it works ok

I read this problem in this forum submitted by others but none of the solution seem to work on my machine

can someone please help on this? Thank You

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

did you try:

compile it in 64bit

run as administrator

controlsend (sometimes send doesnt work)

Another thing to check is, is it actually reaching the send stage? test by making a msgbox befor the send function

Edited by Thornhunt

Budweiser + room = warm beerwarm beer + fridge = too long!warm beer + CO2 fire extinguisher = Perfect![quote]Protect the easly offended ... BAN EVERYTHING[/quote]^^ hmm works for me :D

Share this post


Link to post
Share on other sites

When I compiled that script it produced exe file

when I run that exe file as an administrator, it says "the specified path does not exist"

The file did exist on the network drive

If I run the script straight away it finds the file ok

send and controlsend both doesn't work

Share this post


Link to post
Share on other sites

Yes, I made a msgbox before the send function

msgbox came up after winwaitactive

but still not executing send function

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

have you tried

send("{ALTDOWN}")

send("n")

send("{ALTUP}")

sorry i cant help too much im on my work laptop

//edit lil i missed the "'s

Edited by Thornhunt

Budweiser + room = warm beerwarm beer + fridge = too long!warm beer + CO2 fire extinguisher = Perfect![quote]Protect the easly offended ... BAN EVERYTHING[/quote]^^ hmm works for me :D

Share this post


Link to post
Share on other sites

still doesn't work

Thank you for your time anyway

Share this post


Link to post
Share on other sites

no problemmo, if i get one my pc in time when i get home then i'l be more help since that to runs win7 64bit

but im sure someone here will fix it befor i do that lol


Budweiser + room = warm beerwarm beer + fridge = too long!warm beer + CO2 fire extinguisher = Perfect![quote]Protect the easly offended ... BAN EVERYTHING[/quote]^^ hmm works for me :D

Share this post


Link to post
Share on other sites

On my Windows 7 Pro 64-bit the send function works, for both 32-bit and 64-bit compiled exe. I can confirm that using something like Send("!n") or for example Send("!{TAB}") works.

In my experience sometimes the window 'is not ready to accept commands', even when WinWaitActive says the window is available. Maybe you could try Sleep(1000) right before the Send command to see if it makes any difference? This has worked for me in past.

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

Take a look here at especially the part on User Interface Privilege Isolation (UIPI). If you want to run an installer this should trigger UAC and process elevation. That means your calling script definitly needs to run as admin. I think for debugging running the script with #requireadmin should work, for compiling you should set

#AutoIt3Wrapper_Res_requestedExecutionLevel=requireAdministrator

Edited by KaFu

Share this post


Link to post
Share on other sites

I tried sleep(1000) right before the send command - still no luck

Tried #AutoIt3Wrapper_Res_requestedExecutionLevel=requireAdministrator - this one doesn't help either

Please can someone help me as I am unable to go any further with my script, Thank You

Share this post


Link to post
Share on other sites

Hey, It works for me when I add #requireadmin at the begining of my script

Now my code looks like this

#requireadmin

Opt("WinTitleMatchMode", 2)

Opt("WinTextMatchMode", 2)

$file = "C:Setup.exe"

ShellExecuteWait($file)

if @error then

Msgbox(0,"Error","installer not found")

exit

endif

WinWaitActive("Setup")

sleep(1000)

;MsgBox(0, "Welcome", "works")

send("!n")

exit

Thank You very much

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0