Jump to content

Recommended Posts

Posted

hi, im fairly new to autoit, ive been watching youtube videos to learn, I have successfully been able to do some basic commands but 2 of the codes that I have tried to do have not worked. I have checked and checked again but there seems to be nothing different from my code to the persons on the youtube video and theirs is working fine for them, 

Global $message $name
$ name = "adam"
$ message = "hello"
MsgBox(0,"title", "my name is, "$ name")

this is one of the scripts, any ideas please?

Posted

adam51,

If you are not using SciTE ownload and install the FULL version.  Run your script in SciTE and it will help you with these errors.

kylomas

Forum Rules         Procedure for posting code

"I like pigs.  Dogs look up to us.  Cats look down on us.  Pigs treat us as equals."

- Sir Winston Churchill

Posted

@adam51 Welcome to AutoIt forums, highly recommend looking at AutoIt help file as it has examples for almost every function, it will also show you the correct syntax/format for coding in Autoit.  For example this is how your code should look, note:

  • No spaces between $ and variable name
  • Use & to join/concatenate two or more strings together

Anyway I hope that helps get you started, happy coding.

Global $sName = "adam"
Global $sMessage = "hello"
MsgBox(0,"title", $sMessage & " my name is, " & $sName)

 

Posted

Regards the video, no his information is correct, you probably want to watch the video in fullscreen so you can actually see the code being written, this is his output from the video:

Global $message, $name

$name = "Wesley"
$message = "Hello and welcome"

MsgBox(0,"My title", "My name is " & $name)

 

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
  • Recently Browsing   0 members

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