Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate

" <-- GOSH - I've found it !


  • Please log in to reply
5 replies to this topic
Beastmaster
  • Guests
  • Last active:
  • Joined: --
FBROOT = C:\FB
FBQUEUE = _FBQUEUE
FileName = _TD403301
FileExt = CSV
CustomerName = TURKOM
RequestType = DEL

FileMove, "%FBROOT%\%FBQUEUE%\%FileName%.%FileExt%", "%FBROOT%\%CustomerName%\%RequestType%\%FileName%.%FileExt%"

This won't work. But if you eliminate the leading/trailing (") characters it's working. Why ? Is it a bug (sorry wrong subforum :roll: ) or a feature ?

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
Here's a quote from the FAQ:

When are quotation marks used with commands and their parameters?
Single quotes (') and double quotes (") have no special meaning within the AutoHotkey language; they are always treated literally as if they were normal characters. However, when AutoHotkey launches a program or document, the operating system usually requires double quotes around any command-line parameter that contains spaces, such as in this example: Run, Notepad.exe "C:\My Documents\Address List.txt"

http://www.autohotkey.com/docs/FAQ.htm

Beastmaster
  • Guests
  • Last active:
  • Joined: --
I'm sorry, my main source is the help, haven't realized that there's other (not less important) info in that separate area. Would you mind to add this to the help ?

-----

As you may have seen I'm very keen on using INI files :lol: cause this provides the option to "outsource" variables which are used within a compiled script. As a result I (or less experienced colleagues) don't have to change any code and have to recompile it if there's a change on the app where it should work on. :wink:

I'm forced to deal with a VB app which needs much of "manual" action (remember my WaitReady> and PixelGetColor [Timeout] requests).

I want to drive these actions using (INI key value) vars within mouse-, send key operations. Unfortunately a task like Send, {DOWN %Num%} or MouseMove, %X,Y% seems not possible.

Am I'm wrong ? Is there a slight chance to get this fnctionality in the (near) future ? 8)

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
You're right about the FAQ needing to be in the help file. Thanks.

a task like Send, {DOWN %Num%} or MouseMove, %X,Y% seems not possible.

You can do this, just make sure that each parameter is a variable (you can't include multiple parameters in a single variable reference). For example, the following should work:
Send, {DOWN %Num%} ; This is exactly as you had it and should work.
MouseMove, %X%,%Y% ; X & Y must be separate variables.

If you have a variable that contains two comma-delimited coordinates, you can use StringSplit:
CoordXY = 15,20
StringSplit, Coord, CoordXY

After running the above, Coord1 will contain the X coord and Coord2 will contain the Y coord.

Rajat
  • Members
  • 1904 posts
  • Last active: Jul 17 2015 07:45 AM
  • Joined: 28 Mar 2004
if i'm getting correctly what u mean to say then u want to get info from .ini file and the info in question consists of spl characters that create problem.
i once faced this trouble too, while coding a script.
what i did was used different chars in the .ini altogether and after reading it, did a stringreplace.
eg.
the .ini (or just a normal text file) has to have %comspec%
i write instead and after reading it i do a stringreplace to change it back to form.
this approach can be used for every char, even if u run out of chars or have to use them normally then also u can make combinations like @@ which are rearely used literally.

hope it helps. or did i understand ur requirement wrongly altogether?

MIA

CleanNews.in : Bite sized latest news headlines from India with zero bloat


Beastmaster
  • Guests
  • Last active:
  • Joined: --
Well, Chris has answered my questions so far. Nevertheless you've pointed out something which someone, somewhere save his/her time on debugging !

Thx. a lot for that additional information. :D