Jump to content

Help how to send variable string text windows title


Go to solution Solved by alienclone,

Recommended Posts

Hello excuse me if you have seen my question before.

 

My part of the script that playing up, looks for a window be become actiave and then closes.

 

WinWaitActive("[TITLE:New folder ; CLASS:CabinetWClass]","")
ControlClick("[TITLE:New folder ; CLASS:CabinetWClass]", "", "[id:1001]")
WinClose("[TITLE: New folder; CLASS:CabinetWClass]")

This code upabove  works fine

how does send a string to a windows control 

$pathString = "New folder"

WinWaitActive("[TITLE: &$pathString ; CLASS:CabinetWClass]","")

ControlClick("[TITLE: &$pathString ; CLASS:CabinetWClass]", "", "[id:1001]")
WinClose("[TITLE: &$pathString; CLASS:CabinetWClass]")

 

how do i send to a window just the new folder and a variable

thank you time and for your help

kevin

Link to comment
Share on other sites

look:

WinWaitActive("[TITLE:" & $pathString  & "; CLASS:CabinetWClass]","")

Saludos

Link to comment
Share on other sites

  • Solution

look:

WinWaitActive("[TITLE:" & $pathString  & "; CLASS:CabinetWClass]","")

Saludos

 

Danyfirex is correct, quotation mark placement is very important.

unless the folder name is literally "&$pathString" , then it should not be inside the quotation marks.

ive spent hours fighting with codes because of this issue.

when in SciTE script editor pay careful attention to the colors of the words in your code, that is helpful in understanding where a line of code is messing up.

:alien:

$pathString = "New folder"
 
WinWaitActive("[TITLE: &$pathString ; CLASS:CabinetWClass]","")
ControlClick("[TITLE: &$pathString ; CLASS:CabinetWClass]", "", "[id:1001]")
WinClose("[TITLE: &$pathString; CLASS:CabinetWClass]")

variables and array names ($var) should always be black, whether they are being defined...

$pathString = "New folder"

or being called...

WinWaitActive("[TITLE:" & $pathString  & "; CLASS:CabinetWClass]","")
If @error Then
    MsgBox(262192, "", @ComputerName & " slaps " & @UserName & " around a bit with a large trout!")
EndIf

"Yeah yeah yeah patience, how long will that take?"  -Ed Gruberman

REAL search results  |  SciTE4AutoIt3 Editor Full Version

Link to comment
Share on other sites

Thank you,

Danyfirex and alienclone

Sorry Danyfirex you were the first to answer but I will have to go with alienclone 

for education.

Seeing how simple it was.

Seems like i have to go to the supermarket and buy a wet fish and slap myself.

I could not looking and searching other peoples scripts there were no windows Titles that had variables names.

thankyou both 

Link to comment
Share on other sites

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...