Sign in to follow this  
Followers 0
dearbear

Help how to send variable string text windows title

6 posts in this topic

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

Share this post


Link to post
Share on other sites



look:

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

Saludos

Share this post


Link to post
Share on other sites

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

>Exit code: 0

REAL search results

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

Share this post


Link to post
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 

Share this post


Link to post
Share on other sites

Don't worry.

You're Welcome.

Saludos

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