Sign in to follow this  
Followers 0
Buckw1

Newby Question?

6 posts in this topic

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

Share this post


Link to post
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

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....


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

volly... you need to get your closing "/" in the code box's ( in the PM also)

i use message boxes also, its a great way to "stop" the script at that point

8)


NEWHeader1.png

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Thanks everyone, all answers helped. I think I'll use #cs/#ce to comment out the code from the point I want to stop at. Then I can just keep moving the #cs point down.

Buck

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