Jump to content

Recommended Posts

  • Moderators
Posted (edited)

My understanding of the restart function was that it will restart a running script, your example ends before you could restart it. Try this, which restarts just fine for me.

HotKeySet("{F1}", "count")

Global $x = 0

While 1
    $x += 1
    Sleep(250)
WEnd


Func count()
    MsgBox(0, "", $x)
EndFunc
Edited by JLogan3o13

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Posted

OK. i solved the mistery.

there is something in the way that SciTE does the Restart (ctrl-alt-F5) that invokes the keys CTRL+Break.

since in my computer (Lenovo T430) the break key was eliminated, then the scite restart scrpt dont work :-(

thanks all for your interest

Posted

The way that the script is restarted with Ctrl+Alt+F5 is done by AutoIt3Wrapper, it sets a hotkey for that combination, and if you press it it does a processclose on the running script and then just reruns the script the same way it started it the first time. No ctrl-break used.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

  • 5 months later...
Posted (edited)

I have the same problem with AutoIt3Wrapper v.2.2.0.3, SciTE v.3.4.1.0 and autoit 3.3.11.6 (or 3.3.12.0)

No script restarts.

This simple script:

local $i=0
while 1
    ConsoleWrite($i)
    $i +=1
    sleep(1000)
WEnd

doesn't restart

I found anyway in the Menu Tools the line:

SyntaxCheck Beta with the same Ctrl+Alt+F5

Could it be that?

But I changed it in au3.properties and nothing happens.

Edited by frank10
  • Developers
Posted

I have the same problem with AutoIt3Wrapper v.2.2.0.3, SciTE v.3.4.1.0 and autoit 3.3.11.6 (or 3.3.12.0)

No script restarts.

This simple script:

local $i=0
while 1
    ConsoleWrite($i)
    $i +=1
    sleep(1000)
WEnd

doesn't restart

I found anyway in the Menu Tools the line:

SyntaxCheck Beta with the same Ctrl+Alt+F5

Could it be that?

But I changed it in au3.properties and nothing happens.

Agree I've picked the "wrong" shortcut here by using the same as shortcut as defined for "Syntaxcheck Beta", but when taking your script and running it in SciTE, the Ctrl+Alt+F5 works fine for restarting the script every time.

Jos

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

Posted

So, what could I do to make the restart work?

The only thing I did from default, was changing the au3Check with the latest version.

I tried also to reinstall the package, but nothing...

Posted (edited)

I solved it changing line 1065 in the AutoIt3Wrapper.au3:

HotKeySet('^!{F6}', 'Run_the_Script')

(and line 1085):
 

ConsoleWrite('--> Press Ctrl+Alt+F6 to Restart or Ctrl+Break to Stop' & @CRLF)

and compiling the wrapper again.

But I don't know why it didn't work with F5...

Anyway, solved it.

Edited by frank10

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