Sign in to follow this  
Followers 0
Jango

Problem with SEND

9 posts in this topic

Hi,

I have a problem with my script, i would like to open the properties of a folder so i wrote this little script:

It opens the WindowsDir and select the Temp folder (choose another folder if you don't have Temp) then send a ALT + ENTER (try to press the key just after the windows open to see what happen)

But the

Send("{ALT}{ENTER}", 0)oÝ÷ ÙÚ³g·
+«­¢+ÙIÕ¸ ÅÕ½ÐíáÁ±½Éȹá½Í±Ð°ÅÕ½ÐìµÀì]¥¹½ÝͥȵÀìÅÕ½ÐìÀäÈíQµÀÅÕ½Ðì¤)%]¥¹]¥ÑÑ¥Ù¡]¥¹½ÝͥȰÅÕ½ÐìÅÕ½Ðì°ÄÀ¤±ÐìÐìÀQ¡¸(%M¹ ÅÕ½Ðíí1Qõí9QIôÅÕ½Ðì°À¤)¹%

Anyone know why ?

Share this post


Link to post
Share on other sites



Start > Run > Explorer.exe /select C:\Windows\Temp > Ok

Error: path /select C:\Windows\Temp doesn't exist. Properties? We're probably running a different version of Windows.

Share this post


Link to post
Share on other sites

Start > Run > Explorer.exe /select C:\Windows\Temp > Ok

Error: path /select C:\Windows\Temp doesn't exist. Properties? We're probably running a different version of Windows.

Yes if the WindowsDir\Temp does not exist for you then try another one it's not important...

i'm using XP SP2

The thing that does'nt work is the SEND ALT+ENTER

Do ALT+ENTER with the keyboard on a folder to see what should happen when SEND ALT+ENTER with AutoIt

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Run("Explorer.exe /select," & @WindowsDir & "\Temp")
If WinWaitActive(@WindowsDir, "", 10) <> 0 Then
    Send("!{ENTER}")
EndIf
Edit: Works for my on XP SP2 - after I recreated temp in that folder...

Note the "!{ENTER}"

Edited by herewasplato

[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

...Do ALT+ENTER with the keyboard...

If you want AutoIt to do what you did as a human, then:
Run("Explorer.exe /select," & @WindowsDir & "\Temp")
If WinWaitActive(@WindowsDir, "", 10) <> 0 Then
    Send("{ALT DOWN}")
    Send("{ENTER}")
    Send("{ALT UP}")
EndIf

[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

Yes if the WindowsDir\Temp does not exist for you then try another one it's not important..

I wasn't clear enough. The directory exists, the /select command altogether doesn't work.

Share this post


Link to post
Share on other sites

Thank you it works !...

You are welcome... but I would use:
Run("Explorer.exe /select," & @WindowsDir & "\Temp")
If WinWaitActive(@WindowsDir, "", 10) <> 0 Then Send("!{ENTER}")
Single line If with no EndIf.

There is not much reason to code the Alt Down and Alt Up solution.


[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

If you want AutoIt to do what you did as a human, then:

Run("Explorer.exe /select," & @WindowsDir & "\Temp")
If WinWaitActive(@WindowsDir, "", 10) <> 0 Then
    Send("{ALT DOWN}")
    Send("{ENTER}")
    Send("{ALT UP}")
EndIf
:whistle:

If WinWaitActive(@WindowsDir, "", 10) <> 0 Then

Send("{ALT DOWN}{ENTER}{ALT UP}")

EndIf


[quote]I am so clever that sometimes I don't understand a single word of what I am saying.[/quote]

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