Jump to content

Newby Question?


Recommended Posts

Hi,

Am just starting to do some coding with autoit and have a few questions...btw, I'm very used to MacroScheduler.

Is there a break command I can add into the script to stop execution. I'm using the sci editor.

Is there any way to step thru the code?

Buck

Link to comment
Share on other sites

  • Developers

Hi,

Am just starting to do some coding with autoit and have a few questions...btw, I'm very used to MacroScheduler.

Is there a break command I can add into the script to stop execution. I'm using the sci editor.

Is there any way to step thru the code?

Buck

AutoIt3 doesn't support step mode (yet) .

When you mean you are using SciTE, you could have a look at the Trace and debug options which insert ConsoleWrite or MsgBoxes in your script for debugging/tracing....

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

One trick I do since you can't step thru is to put msgbox in a spot to check to see if what I want to happen does. For example, I will use a msgbox to see of a window is seen.

$test = winexists("Untitled","")

if $test = 1 then msgbox(0,"","")[code=auto:0]

It doesn't always work, for it depends on what you are doing, but it helps. Also, with what Jdeb suggest, it will work well also. I try to use both when debugging.

Link to comment
Share on other sites

Hi,

Am just starting to do some coding with autoit and have a few questions...btw, I'm very used to MacroScheduler.

Is there a break command I can add into the script to stop execution. I'm using the sci editor.

Is there any way to step thru the code?

Buck

You can also use "Tooltip" statements throughout your code, especially in big loops where values change rapidly. If you use Msgbox statements, you might want to add the timeout value in the statement so you don't have to press OK every time a message comes up. Additionally, you can use the option for tray debugging:

TrayIconDebug If enabled shows the current script line in the tray icon tip to help debugging.

0 = no debug information (default)

1 = show debug

This let's you see exactly where your code hung up.
...by the way, it's pronounced: "JIF"... Bob Berry --- inventor of the GIF format
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...