Inververs Posted August 20, 2014 Share Posted August 20, 2014 (edited) whether there SciTe command startup script at the opening? something like this: SciTE.exe script.au3 -start? Edited August 20, 2014 by Inververs Link to comment Share on other sites More sharing options...
Developers Jos Posted August 20, 2014 Developers Share Posted August 20, 2014 (edited) There is no direct SciTE option as far as I know, but you could use a script to do this for you. Compile this script and then open the scriptfile with this EXE. it will open the file in SciTE and do the GO command. SciTE needs to run with this script. ; Check if parameter is specified If $CmdLine[0] = 1 then ConsoleWrite('+ Opening and runnning file:' & $CmdLine[1] & @CRLF) SendSciTE_Command("open:" & StringReplace($CmdLine[1],"\","\\")) ; Open the file from the commandline SendSciTE_Command("menucommand:303") ; Go command ;~ SendSciTE_Command("close:") ; close file Else ConsoleWrite('! Specify file to run!' & @CRLF) EndIf ; ; Send command to SciTE Func SendSciTE_Command($sCmd) ; Get SciTE DirectorHandle Local $WM_COPYDATA = 74 Local $Scite_hwnd = WinGetHandle("DirectorExtension") ConsoleWrite('-->' & $sCmd & @LF) Local $CmdStruct = DllStructCreate('Char[' & StringLen($sCmd) + 1 & ']') DllStructSetData($CmdStruct, 1, $sCmd) Local $COPYDATA = DllStructCreate('Ptr;DWord;Ptr') DllStructSetData($COPYDATA, 1, 1) DllStructSetData($COPYDATA, 2, StringLen($sCmd) + 1) DllStructSetData($COPYDATA, 3, DllStructGetPtr($CmdStruct)) DllCall('User32.dll', 'None', 'SendMessage', 'HWnd', $Scite_hwnd, _ 'Int', $WM_COPYDATA, 'HWnd',0 ,'Ptr', DllStructGetPtr($COPYDATA)) EndFunc ;==>SendSciTE_Command Jos Edited August 20, 2014 by 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. Link to comment Share on other sites More sharing options...
Developers Solution Jos Posted August 20, 2014 Developers Solution Share Posted August 20, 2014 There is no direct SciTE option as far as I know, but you could use a script to do this for you. I take this back... this also works: "C:Program Files (x86)AutoIt3SciTESciTE.exe" "-open:C:pathtest.au3" "-menucommand:303" 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. Link to comment Share on other sites More sharing options...
Inververs Posted August 20, 2014 Author Share Posted August 20, 2014 (edited) Jos, thanks! Menucommand is what you need.Before that, I used the following code:Run($scite_path & ' ' & $CmdLine[2]) WinActivate(WinWait("[CLASS:SciTEWindow]")) Send('{F5}')Now I will restart the script your way. Edited August 20, 2014 by Inververs Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now