Sign in to follow this  
Followers 0
koolkid

.au3 For Inserting Two Lines

7 posts in this topic

#1 ·  Posted (edited)

i got help from CyberSlug and that worked in textpad, but somehow, i dont know why, the script as a shaky behaviour: sometimes runs, others no.

when i click the tool, the icon appears in the task bar and imediatly disapears, and rarely apears in the system tray, near the clok - that's when its working.

EDITED:

the icon apears "onmouseup", i mean, when i'm releasing the mouse, and then just vanishes...

how can i fix it?

i did everything you told me; tried using the tools, and alternatevly i run the autoit.exe to run the script but with no effect...

can you help again, pls?

thanks in advance

Edited by koolkid

Share this post


Link to post
Share on other sites



Guess you'r taking about AutoSense ?

Couple of questions:

- What is the exact title in Window of the editor you run ?

- What do you have as value for $TEXT_EDITOR = in the AutoSense.au3?


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

its not that.

its this script:

; AutoIt 3.0.100 Script 
; When run, the Enter key in TextPad inserts two lines. 
; Script automatically terminates when TextPad is closed. 
; 
Opt("TrayIconHide", 0) ;0=show, 1=hide 
HotKeySet("{Enter}", "DoubleSpace") 
While WinExists("TextPad") 
   sleep(100) 
WEnd 
Exit 

Func DoubleSpace() 
   HotKeySet("{Enter}") ;unregister hotkey to avoid infinite loop! 
   Send("{Enter}") 
   If WinActive("TextPad") Then ;then send Enter again 
      Send("{Enter}") 
   EndIf 
   HotKeySet("{Enter}", "DoubleSpace") ;re-register hotkey 
EndFunc

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Works like a charm for me....

The SYSTEMtray ICON stays always active till i close TextPad.

Isn't your systemtray collapsed? (in other words : left of the system tray: click on the <)

Edited by JdeB

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

i did discover something!!!!:

the script runs ok IF i have no workarea opened!

If i save a workarea and then open tp and open that workarea, no script.

If i open tp AND CLOSE the workarea, yes!, i get to the script.

Can someone fix it, or is it impossible to fix?

thanks in advance

Share this post


Link to post
Share on other sites

ok that explains it... the start of the windows title changes...

just change the title match mode to 2 ...... :whistle:

; AutoIt 3.0.100 Script 
; When run, the Enter key in TextPad inserts two lines. 
; Script automatically terminates when TextPad is closed. 
; 
Opt("TrayIconHide", 0);0=show, 1=hide 
Opt("WinTitleMatchMode", 2)
HotKeySet("{Enter}", "DoubleSpace") 
While WinExists("TextPad") 
  sleep(100) 
WEnd 
Exit 

Func DoubleSpace() 
  HotKeySet("{Enter}");unregister hotkey to avoid infinite loop! 
  Send("{Enter}") 
  If WinActive("TextPad") Then;then send Enter again 
     Send("{Enter}") 
  EndIf 
  HotKeySet("{Enter}", "DoubleSpace");re-register hotkey 
EndFunc

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

Great!!!

Works perfectly!

thanks a lot

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