maestrith / AHK-Studio

Created with AHK Studio
http://www.maestrith.com
365 stars 68 forks source link

[Feature Request] Disable Syntax-Proof onLoad / onOpen a script #190

Open sl5net opened 6 years ago

sl5net commented 6 years ago

When I open a script error is displayed. I would like to be able to disable this.

Sometimes I open files which are not AHK files. But nevertheless exceptionally use the AHK extension. Then of course I get errors like this: Error: This line does not contain a recognized action.

sl5net commented 6 years ago

workaround:

[code]

AHKcode = ( winTitleError := " ahk_class #32770" SetTitleMatchMode,2 loop,50 { winclose,% winTitleError,Error ; thats disturbing opening ahk-studio. if closed ahk-studio opens winkill,% winTitleError,Error ; thats disturbing opening ahk-studio. if closed ahk-studio opens winclose,% winTitleError,Script file not found ; thats disturbing opening ahk-studio. if closed ahk-studio opens winkill,% winTitleError,Script file not found ; thats disturbing opening ahk-studio. if closed ahk-studio opens if(1 && InStr(A_ComputerName,"SL5")) Tooltip,`% A_index ", " A_LineNumber " " RegExReplace(A_LineFile,".*\") , 30,30 sleep,50 } ) DynaRun(AHKcode)

[/code]