Sign in to follow this  
Followers 0
anystupidassname

"""""''""'"'"""""""''''""'""""''!

10 posts in this topic

Could somebody please tell me what logic I should use for long multiple parameter commands so I can get quotes right the first time?!? I've spent 10 minutes before just trying to get quotes right. I have to make a MsgBox(0, "", $var & "'"'whatever" & "'"' & $var & arggggggggggg) just to see what it is coming out as. Has somebody created a command line transformer? Am I being stupid/lazy?!? An example I have had problems with: :whistle:

$chkxcode = RunWait($pcfd & "unzip.exe -d " & '"' & $pcfd & '1"' & " 1.zip", $pcfd)

This signature is computer generated, nothing can go wron#nothing can go wron#nothing can go wron#nothing can go wron#nothing can go wron#nothing can go wron#nothing can go wron#nothing can go wron#nothing can go wron#nothing can go wron#nothing can go wron#.......

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

i don't think this could be correct

run $pcfd

and then use it again in the same string

what is "$pcfd"

2

i dont think this is correct

& '"' &

???

8)

EDIT

this is correct

MsgBox(0, "", $var & " whatever " & $var & "arggggggggggg ")

8)

Edited by Valuater

NEWHeader1.png

Share this post


Link to post
Share on other sites

i don't think this could be correct

run $pcfd

and then  use it again in the same string

what is "$pcfd"

2

i dont think this is correct

& '"' &

???

8)

EDIT

this is correct

MsgBox(0, "", $var & " whatever " & $var & "arggggggggggg ")

8)

<{POST_SNAPBACK}>

Was that a "Microsoft" response I detected? :whistle:

I hate to break it to you but I posted the WORKING result of my toils and tears.

Any suggestions to avoid them in the future? Am I the only one with my brain wired this way?!?

$pcfd = @CommonFilesDir & "\blah\blah\" in this case.


This signature is computer generated, nothing can go wron#nothing can go wron#nothing can go wron#nothing can go wron#nothing can go wron#nothing can go wron#nothing can go wron#nothing can go wron#nothing can go wron#nothing can go wron#nothing can go wron#.......

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

if it worked that's great... just could have been written a little shorterand..

if it works... thats what matters... i check like this

$pcfd = @CommonFilesDir & "\blah\blah\"
 
 
 MsgBox(0, "", $pcfd & "unzip.exe -d " & '"' & $pcfd & '1"' & " 1.zip")

by the way... autoit is my hobbie... i am no where near developer status

i just try to help... if and when i can

8)

Edited by Valuater

NEWHeader1.png

Share this post


Link to post
Share on other sites

if it worked that's great... just could have been written a little shorterand..

if it works... thats what matters... i check like this

$pcfd = @CommonFilesDir & "\blah\blah\"
 
 
 MsgBox(0, "", $pcfd & "unzip.exe -d " & '"' & $pcfd & '1"' & " 1.zip")

by the way... autoit is my hobbie... i am no where near developer status

i just try to help... if and when i can

8)

<{POST_SNAPBACK}>

No worries. Thanks, I didn't mean to sound ungrateful.

If you think that the following command line can be shortened, I'm all ears.

This:

$pcfd & "unzip.exe -d " & '"' & $pcfd & '1"' & " 1.zip"

Ends up running this:

C:\Program Files\Common Files\Microsoft Shared\blah\unzip.exe -d "C:\Program Files\Common Files\Microsoft Shared\blah\1" blah.zip

I was actually wanting to put quotes around blah.zip as well but they are not needed and I couldn't figure it out so...


This signature is computer generated, nothing can go wron#nothing can go wron#nothing can go wron#nothing can go wron#nothing can go wron#nothing can go wron#nothing can go wron#nothing can go wron#nothing can go wron#nothing can go wron#nothing can go wron#.......

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

like this

$pcfd = @CommonFilesDir & "\blah\blah\"
 
 
 MsgBox(0, "", $pcfd & 'unzip.exe -d "' & $pcfd & '1"' & ' " 1.zip"')

i also added the quotes you wanted "blah.zip"

8)

Edited by Valuater

NEWHeader1.png

Share this post


Link to post
Share on other sites

Actually i don't understand the "1" here

...Shared\blah\1" blah.zip

i could understand

...Shared\blah\blah.zip

i do understand

Shared\blah\unzip.exe -d

How does the "1' work..??

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

Actually i don't understand the "1" here

...Shared\blah\1" blah.zip

i could understand

...Shared\blah\blah.zip

i do understand

Shared\blah\unzip.exe -d

How does the "1' work..??

8)

<{POST_SNAPBACK}>

The "1" is a temporary subfolder :whistle:

Yea, I'm weird...

Your suggestion IS slightly shorter and cleaner thanks!

I only removed a space between the " and 1.zip

$pcfd & 'unzip.exe -d "' & $pcfd & '1"' & ' "1.zip"', $pcfd

I still think it would be possible to have a tools that you input the command line and it outputs autoit quotage freakyness...


This signature is computer generated, nothing can go wron#nothing can go wron#nothing can go wron#nothing can go wron#nothing can go wron#nothing can go wron#nothing can go wron#nothing can go wron#nothing can go wron#nothing can go wron#nothing can go wron#.......

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

You do know you can just double up the quotes, right?

msgbox(0, "", "He said, ""She said.""")
Or
msgbox(0, "", '"They''re saying, don''t do that!"')

*Edit: Simple "tool" that will fix your quotes in strings:

$s_String = InputBox('Input', 'Enter the string to convert:', 'They''re saying, "Don''t do that!"', '', 300, 100, default, default)
$s_String = StringReplace($s_String, '"', '""')
$s_String = StringReplace($s_String, "'", "''")
Inputbox('Output', 'Here is your converted string (Copy this):', $s_String, '', 300, 150, default, default)
Edited by Saunders

Share this post


Link to post
Share on other sites

You do know you can just double up the quotes, right?

msgbox(0, "", "He said, ""She said.""")
Or
msgbox(0, "", '"They''re saying, don''t do that!"')

*Edit: Simple "tool" that will fix your quotes in strings:

$s_String = InputBox('Input', 'Enter the string to convert:', 'They''re saying, "Don''t do that!"', '', 300, 100, default, default)
$s_String = StringReplace($s_String, '"', '""')
$s_String = StringReplace($s_String, "'", "''")
Inputbox('Output', 'Here is your converted string (Copy this):', $s_String, '', 300, 150, default, default)

<{POST_SNAPBACK}>

Thats helpful, Thanks. :whistle:

This signature is computer generated, nothing can go wron#nothing can go wron#nothing can go wron#nothing can go wron#nothing can go wron#nothing can go wron#nothing can go wron#nothing can go wron#nothing can go wron#nothing can go wron#nothing can go wron#.......

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