Jump to content

syntax .... very simple?


Recommended Posts

I'm curious...why do people seem to find it needed to launch CMD.exe and make that launch another EXE-file for them,

when they can just start the file that they actually want to start directly with Run anyway ? Like...this for example :

Run("C:\windows\notepad.exe")
Link to comment
Share on other sites

I'm curious...why do people seem to find it needed to launch CMD.exe and make that launch another EXE-file for them,

when they can just start the file that they actually want to start directly with Run anyway ? Like...this for example :

Run("C:\windows\notepad.exe")oÝ÷ Ûú®¢×Ê"¶Ç¯zw²'«Â+ajëh×6Run("notepad.exe")
because it in the windows system dir.
Edited by EndFunc
EndFuncAutoIt is the shiznit. I love it.
Link to comment
Share on other sites

uhg I didn't want to get into that. I won't tell you right away why I'm using cmd, because I'm going to show you some of my code, and from that you should see why I am using cmd.exe.

My new problem is with

@AutoItExe & " /AutoIt3ExecuteLine " & "Run('cmd.exe /c "start C:\windows\notepad.exe"', @HOMEDRIVE, @SW_HIDE)")

This gives me an error every time.... and I've tried many different ways.

The "C:\windows\notepad.exe" is the default line in the GUI to show the end user an example of how to type in the locations to files.

C:\windows\notepad.exe will be where the user's command will be inserted.

Please help :whistle:

Thanks

Link to comment
Share on other sites

uhm....

@AutoItExe & " /AutoIt3ExecuteLine " & "Run('cmd.exe /c "start C:\windows\notepad.exe"', @HOMEDRIVE, @SW_HIDE)")

I am using that line because I am making a remote access program.... the client just sends autoit commands to the server... since you cannot call normal functions, like run, I am using autoit3executeline... when u are using that you cannot AutoItSetOption("RunErrorsFatal", 0) , so if the client told the server to run a file that did not exist, it would come up with an autoit error.

This is why I didn't want to get into WHY i am using this tedious method... but there you have it.

So, can you fix it or not?

Link to comment
Share on other sites

wonderful.... now there is a personal competition on my forum that isn't even addressing the issue of syntax.

great.

@AutoItExe & " /AutoIt3ExecuteLine " & "Run('cmd.exe /c "start C:\windows\notepad.exe"', @HOMEDRIVE, @SW_HIDE)")
Edited by daslick
Link to comment
Share on other sites

wonderful.... now there is a personal competition on my forum that isn't even addressing the issue of syntax.

great.

@AutoItExe & " /AutoIt3ExecuteLine " & "Run('cmd.exe /c "start C:\windows\notepad.exe"', @HOMEDRIVE, @SW_HIDE)")
oh, calm down. :whistle:

@AutoItExe & ' /AutoIt3ExecuteLine "Run('&"'cmd.exe /c "&'"start C:\windows\notepad.exe"'&"', @HOMEDRIVE, @SW_HIDE))"

edit: no wait, that won't work...

Edited by theguy0000

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Link to comment
Share on other sites

i think this one works...

@AutoItExe & ' /AutoIt3ExecuteLine "Run('&"'cmd.exe /c "&'''''start C:\windows\notepad.exe'''''&"', @HOMEDRIVE, @SW_HIDE)"&'"'
Edited by theguy0000

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Link to comment
Share on other sites

Okay... last thing.

in your code you put

@AutoItExe & ' /AutoIt3ExecuteLine "Run('&"'cmd.exe /c "&'"start C:\windows\notepad.exe"'&"', @HOMEDRIVE, @SW_HIDE))"

Mine actually is divided up like this

Run(@AutoItExe & " /AutoIt3ExecuteLine " & $Cmd)

If you look at yours, it does not have the closed single quote until the end... mine doesn't use those at all...

Thanks so much!

Link to comment
Share on other sites

wonderful.... now there is a personal competition on my forum that isn't even addressing the issue of syntax.

great.

I can only guess that you're referring to my post there... Anyway, there's no competition going on here, and my edit wasn't a

victory-attempt at all. You clearly didn't understand that so just move along, calm down and keep that smile wide.

Link to comment
Share on other sites

I'm actually smiling right now... :whistle:... its just kind of a let-down when u wait and wait and finally see a post! - then see that its just people running notepads...

Can anyone seperate one of the posted working run commands into this format? :\

Run(@AutoItExe & " /AutoIt3ExecuteLine " & $Cmd) where $Cmd is the run command

Thanks

Link to comment
Share on other sites

Okay...

I have tried

run(@AutoItExe & ' /AutoIt3ExecuteLine "Run('&"'cmd.exe /c "&'''''start C:\windows\notepad.exe'''''&"', @HOMEDRIVE, @SW_HIDE)"&'"')

and it does not work.

Also, I need a way to send commands to a variable and run them like this...

Run(@AutoItExe & " /AutoIt3ExecuteLine " & $Cmd)

currently, I have gotten none of the suggested code to work. Could someone please take a look?
Link to comment
Share on other sites

  • Developers

currently, I have gotten none of the suggested code to work. Could someone please take a look?

Something like this?

run(@AutoItExe & ' /AutoIt3ExecuteLine "Run(@COMSPEC & '' /c start "C:\windows\notepad.exe"'')', @HOMEDRIVE, @SW_HIDE)

:whistle:

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Yes, thanks. :whistle: Thats the first line that has worked. I still, because of the position of the second single-quote, don't see how to user a variable for the command.

Run(@AutoItExe & ' /AutoIt3ExecuteLine "$Cmd)

Now there are problems with quotes again. At least now we KNOW that it can be done. :P Thanks JdeB!
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...