LoWang Posted June 2, 2011 Share Posted June 2, 2011 Hello, I don't know what happened to it and why did it start happening but it is pretty annoying! I am working on something and I want to check part of some another script, but when I drag and drop the file into SciTE or open it any other way it replaces the currently active file tab with this new. Why does it do it and how can I make it leave all my files open and open the new one in a new tab? Thank you. Link to comment Share on other sites More sharing options...
Developers Jos Posted June 2, 2011 Developers Share Posted June 2, 2011 Did you change or override this one: buffers=20 with this: buffers=1 in SciTEGlobal.properties or SciTEUser.properties? 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...
LoWang Posted June 2, 2011 Author Share Posted June 2, 2011 No. See attachment.SciTEGlobal.zip Link to comment Share on other sites More sharing options...
Developers Jos Posted June 2, 2011 Developers Share Posted June 2, 2011 (edited) What does this script give as output when ran with SciTE? Opt("WinSearchChildren", 1) Global $WM_COPYDATA = 74 ; Get SciTE DirectorHandle $Scite_hwnd = WinGetHandle("DirectorExtension") ; Get My GUI Handle Global $My_Hwnd = GUICreate("AutoIt3-SciTE interface") ;Register COPYDATA message. GUIRegisterMsg($WM_COPYDATA, "MY_WM_COPYDATA") ; SendSciTE_Command($My_Hwnd, $SciTE_hwnd, "askproperty:buffers") ; ; Send command to SciTE Func SendSciTE_Command($My_Hwnd, $Scite_hwnd, $sCmd) Local $My_Dec_Hwnd = Dec(StringRight($My_Hwnd, 8)) $sCmd = ":" & $My_Dec_Hwnd & ":" & $sCmd 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', $My_Hwnd, _ 'Ptr', DllStructGetPtr($COPYDATA)) EndFunc ;==>SendSciTE_Command ; Received Data from SciTE Func MY_WM_COPYDATA($hWnd, $msg, $wParam, $lParam) Local $COPYDATA = DllStructCreate('Ptr;DWord;Ptr',$lparam) $SciTECmdLen = DllStructGetData($COPYDATA, 2) Local $CmdStruct = DllStructCreate('Char['&$SciTECmdLen+1&']',DllStructGetData($COPYDATA, 3)) $SciTECmd = Stringleft(DllStructGetData($CmdStruct, 1),$SciTECmdLen) ConsoleWrite('<--' & $SciTECmd & @lf ) EndFunc ;==>MY_WM_COPYDATA Edited June 2, 2011 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...
rover Posted June 2, 2011 Share Posted June 2, 2011 Hi Jos I just noticed that your using StringTrimLeft() this time in SendSciTE_Command() instead of StringRight() and you forgot to change the 8 to a 2 I see fascists... Link to comment Share on other sites More sharing options...
Developers Jos Posted June 2, 2011 Developers Share Posted June 2, 2011 (edited) Hi Jos I just noticed that your using StringTrimLeft() this time in SendSciTE_Command() instead of StringRight() and you forgot to change the 8 to a 2 True about the StringRight, just adapted an "old" script that stripped the first 2 characters from a hex value work on my current x64 setup. This should work for both x86 as x64 Local $My_Dec_Hwnd = Dec(StringRight($My_Hwnd, 8)) Jos Edited June 2, 2011 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...
LoWang Posted June 3, 2011 Author Share Posted June 3, 2011 >"C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "C:\scripty\pokusy\scite_opt.au3" /autoit3dir "C:\Program Files (x86)\AutoIt3" /UserParams +>09:11:15 Starting AutoIt3Wrapper v.2.0.1.24 Environment(Language:0409 Keyboard:00000405 OS:WIN_7/Service Pack 1 CPU:X64 OS:X64) >Running AU3Check (1.54.19.0) from:C:\Program Files (x86)\AutoIt3 +>09:11:15 AU3Check ended.rc:0 >Running:(3.3.6.1):C:\Program Files (x86)\AutoIt3\autoit3.exe "C:\scripty\pokusy\scite_opt.au3" -->:3807524:askproperty:buffers <--:3807524:macro:stringinfo:20 +>09:11:15 AutoIT3.exe ended.rc:0 >Exit code: 0 Time: 1.134 Link to comment Share on other sites More sharing options...
Developers Jos Posted June 3, 2011 Developers Share Posted June 3, 2011 That is looking good indeed. Not sure what other settings could cause the previous open file to be closed. You did not make any changes to SciTE in either the SciTEproperties, SciTEUser.properties or au3.properties files? 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...
MHz Posted June 3, 2011 Share Posted June 3, 2011 If I would have 20 files open in Scite, then I would expect the last file open to close and allow the next file to take its place as that is what it has done in the past for me. The question is, does LoWang have 20 files open in Scite when this happens? If so, then either have less files open in Scite or raise the amount of buffers in a property file to change the setting. Link to comment Share on other sites More sharing options...
LoWang Posted June 8, 2011 Author Share Posted June 8, 2011 It looks like MHz is right! Now I tried it and see that I have 17 files open and opening of a new one does not close the previous! It is quite possible for me to have 20files open, so the problem happened in this situation So I guess I can change this settings to something like buffers=30 and it should work right? Link to comment Share on other sites More sharing options...
MHz Posted June 9, 2011 Share Posted June 9, 2011 Correct. Select "Options" and then select "Open User Options File" in the Scite menu to open the user options property file. Add the setting "buffers=30" (with no quotes) on a new line and save it. You can then have up to 30 scripts open at once in Scite. Note that settings added to the user options file will override settings in the global options file. The user options file is preferable for user changes. 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