Jump to content

WinActivate does not work in vista?


Recommended Posts

I experience no problem with WinActivate in Vista (UAC off).

This line works just fine.

WinActivate('WinActivate does not work in vista')

:rolleyes:

Interesting, it is working. For some reason it wasn't working earlier.. Wierd...

Anyways, what is the difference between using ' and " they both seem to work?

Link to comment
Share on other sites

Anyways, what is the difference between using ' and " they both seem to work?

Look in the help file under Data Types, Strings. They are interchangeable (in pairs, of course). Either can be used to enclose a literal string of the other:

MsgBox(64, "Test", "Test 1.")
MsgBox(64, 'Test', 'Test 2.')
MsgBox(64, '"Test"', "Test '3'.")
MsgBox(64, "'Test'", 'Test "4".')

:rolleyes:

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Anyways, what is the difference between using ' and " they both seem to work?

Like PsaltyDS states, but for me, I use singles quotes by default and double quotes when needed to protect paths/parameters with spaces.

This example shows the usage literary.

; Default use of single quotes that I use
RunWait('c:\windows\notepad.exe')

; And then also use double quotes to protect string paths/parameters with spaces
RunWait('"c:\program files\internet explorer\iexplore.exe"')

; The above does well with using cmd as well
RunWait('"' & @ComSpec & '" /c explorer "c:\program files\"')

As for using single quotes within double quotes, I only do that if I am forced to handle very complex strings.

:rolleyes:

Link to comment
Share on other sites

Hmm. Did you check window is invisible and you used same title? Eg. if the title is "Untitled - Notepad" and you wrote "Notepad" without changing Opt, it won't work.

BTW this goes to v3 Bug Reports :rolleyes:

I can do signature me.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...