Jump to content

Recommended Posts

Posted

Hi all,

I have problem with folder and filename where are + character. F.e.

HT121_M_(50+50 DF).vd2

I have script where I use fileopendialog to select many files. Then I go through file by file to open those in other program. Everything went well until there were + character in file name.

I debug my code and realize that variables value where right just before typing the filename.

F.e.

msgbox(0,"0",$file_to_open)

ControlSend("Select a file to import machines from","","Edit1",$file_to_open)

In msgbox the filename are:HT121_M_(50+50 DF).vd2

But when typing in Edit1 textfield it's: HT121_M_(50%0 DF).vd2

Anyway, easy solution (maybe not easiest) is to change filenames, but in this case that's not the best wayt to do this, cause I need to keep those original names. Anyone has idea?

Cheers

Simplify

Posted (edited)

I made a small test with a Run('+') after renaming a program to '+.exe'. And I had no problems, can we see some code?

Otherwise you can roll a number to find a unusu need ed temp filename and saving the original name in a variant, rename, do what you need and rename to the old name....

Edited by ezzetabi
Posted

Hi all,

Thx for your answer.

Can you try following examples. in windows Start -> Run and then run this script:

$file_to_open="(25 + 25).vd2"
controlfocus("Run","","Edit1")
ControlSend("Run","","Edit1",$file_to_open)

Im my computer and workmate also the + character are missing...

Winxp sp2

Regional settings: English (United Kingdom)

How this work for you?

Cheers

Simplify

Posted

Hehe. Send 'em raw. The "+" key is a "shift" function in AutoIt. If you send the keys raw, it ignores the special characters.

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Posted

Hehe.  Send 'em raw.  The "+" key is a "shift" function in AutoIt.  If you send the keys raw, it ignores the special characters.

<{POST_SNAPBACK}>

Oooh! Of course. It also happens when using just send command...

Cheers

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
×
×
  • Create New...