split Code to more than one line?
- PuzzledGreatly
- Posts: 1303
- Joined: 29 Sep 2013, 22:18
split Code to more than one line?
Any suggestions for how to make a filecopy with very long paths more legible. I tried splitting the line at a comma but then the filecopy didn't work. I suppose I could use variables, one for source and the other for target but that takes more lines. VBA allows the user to split at a _. Nothing similar in autohotkey? Thanks
Re: split Code to more than one line?
thanks for clarifying VB. i always wondered about "_" used in this case:
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Re: split Code to more than one line?
?
Code: Select all
FileCopy
, C:\SomeFilePath\SomeFile.ext
, C:\OtherFilePath
Re: split Code to more than one line?
how do you split this long path:
Code: Select all
FileCopy
, C:\SomeFilePath1\SomeFilePath2\SomeFilePath3\SomeFilePath4\SomeFilePath5\SomeFilePath6\SomeFilePath7\SomeFilePath8\SomeFilePath9\SomeFilePath10\SomeFilePath11\SomeFilePath12\SomeFilePath13\SomeFilePath14\SomeFilePath15\SomeFile.ext
, C:\OtherFilePath
- PuzzledGreatly
- Posts: 1303
- Joined: 29 Sep 2013, 22:18
Re: split Code to more than one line?
Can anyone confirm if splitting a line with a comma works with filecopy as when I tried it it didn't work for me. Thanks
Re: split Code to more than one line?
The above code worked for me. Perhaps post the code you have tried.
Re: split Code to more than one line?
Code: Select all
FileCopy,% "
(Join
C:\SomeFilePath1\SomeFilePath2\SomeFilePath3\SomeFilePath4
\SomeFilePath5\SomeFilePath6\SomeFilePath7\SomeFilePath8\SomeFilePath9
\SomeFilePath10\SomeFilePath11\SomeFilePath12\SomeFilePath13\SomeFilePath14
\SomeFilePath15\SomeFile.ext
)", C:\OtherFilePath
Re: split Code to more than one line?
We call it Expressions.
Enjoy !!
or We can call it Concatenate operators.
Enjoy !!
Code: Select all
FileCopy
, % "C:\"
. "SomeFilePath1\"
. "SomeFilePath2\"
. "SomeFilePath3\"
. "SomeFilePath4\"
. "SomeFilePath5\"
. "SomeFilePath6\"
. "SomeFilePath7\"
. "SomeFilePath8\"
. "SomeFilePath9\"
. "SomeFile.ext"
, % "C:\"
. "SomeFilePath9\"
. "SomeFilePath8\"
. "SomeFilePath7\"
. "SomeFilePath6\"
. "SomeFilePath5\"
. "SomeFilePath4\"
. "SomeFilePath3\"
. "SomeFilePath2\"
. "SomeFilePath1\"
. "SomeFile.ext"
Re: split Code to more than one line?
Yeah I've tried using the comma too. With one script it worked and yet with another it didn't. The Help documentation doesn't say anything about there being scenarios where it won't work so I'd like to know why it didn't.PuzzledGreatly wrote:I tried splitting the line at a comma but then the filecopy didn't work.
Re: split Code to more than one line?
What's your scenarios, specifically ?kiwichick wrote:Yeah I've tried using the comma too. With one script it worked and yet with another it didn't. The Help documentation doesn't say anything about there being scenarios where it won't work so I'd like to know why it didn't.PuzzledGreatly wrote:I tried splitting the line at a comma but then the filecopy didn't work.
The help file is just a man-made one. It's not perfect at all. More importantly it is free of charge. If possible, your help will be very valuable for the better Help file.
Re: split Code to more than one line?
Thanks Hamlet, Unfortunately I can't remember what script it was but if I come across the issue again I'll definitely post back hereHamlet wrote:What's your scenarios, specifically ?
The help file is just a man-made one. It's not perfect at all. More importantly it is free of charge. If possible, your help will be very valuable for the better Help file.
Who is online
Users browsing this forum: GollyJer, Lamron750, septrinus, shawn_xwang and 244 guests