Jump to content

Noob question


Recommended Posts

RunWait(@HomeDrive & "/c " & "messagebox "window title" "message")

messagebox.exe is in the same directory as built script.

All i get is error line -1 and messagebox will not give me anything.

Hey stoopid,(there I said it)

I don't know what you are trying to achieve with your above code....

why not use::

RunWait(@SCRIPTDIR &'messagebox.exe "TITLE" "UR MSG"',@SCRIPTDIR)

or using your method but the correct way::

RunWait(@COMSPEC &' /c messagebox.exe "TITLE" "UR MSG"',@SCRIPTDIR)

you seem to be getting confused with macro's and environment variables somewhere.... ;)

If so, any chance that CMD will die out in future versions of windows ? LOL that would suck.

^_^ not unless goons or Vistafarians take over OS development, instead of programmers :(

I am curious what code editor are you using if you are not using scite? Notepad++ maybe?

Vlad

wtfpl-badge-1.png

Link to comment
Share on other sites

  • Moderators

Hey stoopid,(there I said it)

I don't know what you are trying to achieve with your above code....

why not use::

RunWait(@SCRIPTDIR &'messagebox.exe "TITLE" "UR MSG"',@SCRIPTDIR)

or using your method but the correct way::

RunWait(@COMSPEC &' /c messagebox.exe "TITLE" "UR MSG"',@SCRIPTDIR)

you seem to be getting confused with macro's and environment variables somewhere.... ;)

^_^ not unless goons or Vistafarians take over OS development, instead of programmers :(

I am curious what code editor are you using if you are not using scite? Notepad++ maybe?

Vlad

Don't forget using @ScriptDir or others, if your path contains spaces in it, you'll want to make sure it's surrounded in quotes on the send.

eg.

Run('"' & @ScriptDir & '\mydir\myexe.exe" "Title" "Your Msg"', @ScriptDir)

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Don't forget using @ScriptDir or others, if your path contains spaces in it, you'll want to make sure it's surrounded in quotes on the send.

eg.

Run('"' & @ScriptDir & '\mydir\myexe.exe" "Title" "Your Msg"', @ScriptDir)
My bad,

my offering was full of silly errors that I corrected the OP on just a couple of posts ago.

and yeah, either always enclose any filepath string in literal quotes. (just in case)

Or write a little routine to do it for you.

Vlad

wtfpl-badge-1.png

Link to comment
Share on other sites

RunWait(@COMSPEC &' /c messagebox.exe "TITLE" "UR MSG"',@SCRIPTDIR)

worked

1st one didnt

Thanks.

and WOW i didnt know sometimes i had to use single quotes.

DAMN IT another thing to learn how to use ^_^

Thanks Smokee and B/\ADuC/\AB

Edited by stoopid
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...