Sign in to follow this  
Followers 0
Marcelos

Restart script in SciTe

18 posts in this topic

Hi.

i really try to find how to restart a running script in SciTe , without success. ( may be the late hour)

i get the "Press Ctrl+Alt+F5 to Restart or Ctrl+Break to Stop" when i run the script with F5 . but unable to restart the script with CTRL-Alt-F5

thanks

Share this post


Link to post
Share on other sites



What version of AutoIt and SciTe are you using? In the latest version, on both WIN7 and WIN8, it works fine for me.


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

Hi

thaks for the fast answer :-)

the version is Version 3.3.0 for SciTe and v3.3.8.1 for autoit.

i use win7.

when i run any script in the scite, with F5 , or "go" , i cand use the ctrl+alt+F5 to stop and restart

i need to use ctrl+Break , and F5 :-)

regards

Share this post


Link to post
Share on other sites

As Jos asked, please post your script so we can see what is blocking the restart.


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

Any script. this is not script related.

if you tell me that this works for all of you , then something in my computer needs to be done.

thanks

ex.

$file = FileOpen("test.txt", 10) ; which is similar to 2 + 8 (erase + create dir)

If $file = -1 Then
    MsgBox(0, "Error", "Unable to open file.")
    Exit
EndIf

FileClose($file)

Share this post


Link to post
Share on other sites

#7 ·  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

√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

Try this script and hit Ctrl+Alt+F5 to restart in stead of "ctrl+Break , and F5" you specified!

For $x = 1 To 100
    Sleep(1000)
Next

Jos


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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

#12 ·  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

Share this post


Link to post
Share on other sites

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


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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

#15 ·  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

Share this post


Link to post
Share on other sites

I have already made the change for the next version to use "Ctrl+Alt+Break to Restart" to avoid any conflict and just uploaded it to the Beta directory.

Jos


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

Share this post


Link to post
Share on other sites

Thank you Jos.

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