Jump to content
Sign in to follow this  
SImplify

Filename and + character

Recommended Posts

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

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

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...