Sign in to follow this  
Followers 0
SImplify

Filename and + character

7 posts in this topic

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

Share this post


Link to post
Share on other sites



#2 ·  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

Share this post


Link to post
Share on other sites

I can not find any problems under English version of Windows XP Pro SP2....

What language and version of Windows do you use? (I wonder if there is some issue with unicode/nonEnglish Windows versions)


Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Guess you haven't read about the parameters for ControlSend, have you? Note the one that's called "flag".

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

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