JohnBailey Posted September 13, 2007 Posted September 13, 2007 (edited) If the title didn't explain it enough (which it is probably confusing), I want to add a button or menu item or something to SciTE. With that button I want to be able to simple add the current date to an open au3 file at a certain position. I would later add things like username and etc.This helps me and a few blokes here.EDIT:My apologies. I need to edit SciTE4AutoIt3 not just SciTE. :"> Edited September 13, 2007 by JohnBailey A decision is a powerful thing
Siao Posted September 13, 2007 Posted September 13, 2007 This link explains exactly what you want:http://lua-users.org/wiki/SciteMiscScripts "be smart, drink your wine"
MadBoy Posted September 13, 2007 Posted September 13, 2007 If the title didn't explain it enough (which it is probably confusing), I want to add a button or menu item or something to SciTE. With that button I want to be able to simple add the current date to an open au3 file at a certain position. I would later add things like username and etc.This helps me and a few blokes here.EDIT:My apologies. I need to edit SciTE4AutoIt3 not just SciTE. :Check AnyGui.au3 -> http://www.autoitscript.com/forum/index.php?showtopic=9517This might get you started to do it external autoit way. Otherwise talk with JdeB he can prolly help you out My little company: Evotec (PL version: Evotec)
JohnBailey Posted September 13, 2007 Author Posted September 13, 2007 Check AnyGui.au3 -> http://www.autoitscript.com/forum/index.php?showtopic=9517This might get you started to do it external autoit way. Otherwise talk with JdeB he can prolly help you out I was wanting to do a direct SciTE edit. Can we address JdeB directly? I didn't think we could msg Mods unless they specifically requested. Maybe I'm nuts! A decision is a powerful thing
Developers Jos Posted September 13, 2007 Developers Posted September 13, 2007 (edited) you can also use an autoitscript and use SciTE's Director interface... Below a basic script that will insert the date at the place where the carret is located use it to add a nice gui asking what you want to insert .... just let your imagination work #include<date.au3> ; SendSciTE_Command('insert:' & _DateTimeFormat( _NowCalc(),2)) ; ; ; Send command to SciTE Func SendSciTE_Command($sCmd) Opt("WinSearchChildren", 1) Local $WM_COPYDATA = 74 Local $My_Hwnd = 0 ; Get SciTE DirectorHandle 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', $My_Hwnd, _ 'Ptr', DllStructGetPtr($COPYDATA)) EndFunc;==>SendSciTE_Command Edited September 13, 2007 by JdeB 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.
MadBoy Posted September 13, 2007 Posted September 13, 2007 Can we address JdeB directly? I didn't think we could msg Mods unless they specifically requested. Maybe I'm nuts!I think if you don't abuse and msg anyone on daily basis I think messaging mod (in this case JdeB) is allowed At least i never hestiated ;> My little company: Evotec (PL version: Evotec)
Developers Jos Posted September 13, 2007 Developers Posted September 13, 2007 I think if you don't abuse and msg anyone on daily basis I think messaging mod (in this case JdeB) is allowed At least i never hestiated ;>I don't mind getting PM's every now and then but in general its better to post in the public forum when you have question like this so other can chime in too... 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.
JohnBailey Posted September 13, 2007 Author Posted September 13, 2007 you can also use an autoitscript and use SciTE's Director interface...haha, hi JdeB! Right after I posted my comment about wondering if I could msg you, you posted here.First, Director Interface is something I looked at, but wasn't sure if I was even climbing the right tree. Second, I want to avoid writing a app using AU3 if at all possible.This link explains exactly what you want:http://lua-users.org/wiki/SciteMiscScriptsI can't edit the SciTEUser.properties. It gives me a msg saying I must save as. A decision is a powerful thing
MadBoy Posted September 13, 2007 Posted September 13, 2007 haha, hi JdeB! Right after I posted my comment about wondering if I could msg you, you posted here.First, Director Interface is something I looked at, but wasn't sure if I was even climbing the right tree. Second, I want to avoid writing a app using AU3 if at all possible.I can't edit the SciTEUser.properties. It gives me a msg saying I must save as.Change attribute of file? Probably set as read only ? My little company: Evotec (PL version: Evotec)
JohnBailey Posted September 13, 2007 Author Posted September 13, 2007 Is it a better idea to create an AU3 App due to updating SciTE can write over any altered files? However, as I come back to this question I can't help but ask, "Yeah, but you can just save those files and then put them back whenever you update." Any more wisdom gang? A decision is a powerful thing
Developers Jos Posted September 13, 2007 Developers Posted September 13, 2007 haha, hi JdeB! Right after I posted my comment about wondering if I could msg you, you posted here.First, Director Interface is something I looked at, but wasn't sure if I was even climbing the right tree. Second, I want to avoid writing a app using AU3 if at all possible.I can't edit the SciTEUser.properties. It gives me a msg saying I must save as.LUA is fine too and its build on the same stuff the Director interface is build on in SciTE.The reason for proposing AutoIt3 is that you could assign a single shortcut in SciTE and have that start and Au3 script showing a GUI will multiple option to insert things like Date/Time/Username etc .....either way should work .. Do you have write access to @UserProfileDir ? That is the location SciTEUser.properties is located...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.
Developers Jos Posted September 13, 2007 Developers Posted September 13, 2007 (edited) Is it a better idea to create an AU3 App due to updating SciTE can write over any altered files? However, as I come back to this question I can't help but ask, "Yeah, but you can just save those files and then put them back whenever you update."Any more wisdom gang?let me make sure I understand what you want to accomplish: Do you want to insert the date one time or have other intentions ? Edited September 13, 2007 by JdeB 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.
JohnBailey Posted September 13, 2007 Author Posted September 13, 2007 The reason for proposing AutoIt3 is that you could assign a single shortcut in SciTE and have that start and Au3 script showing a GUI will multiple option to insert things like Date/Time/Username etc ....."Assign a single shortcut" WHAT?! How do you do that?! :-D :excited:Do you have write access to @UserProfileDir ? That is the location SciTEUser.properties is located... :"> A decision is a powerful thing
JohnBailey Posted September 13, 2007 Author Posted September 13, 2007 (edited) let me make sure I understand what you want to accomplish: Do you want to insert the date one time or have other intentions ?The only other intentions I can think of having is putting the windows username in line 2 right above line 3 (those lines are standard in my au3 files for small projects with office mates).EDITI thought it would be easy enough and would teach me something extremely cool or at least helpful or interesting. This would also save me time. Edited September 13, 2007 by JohnBailey A decision is a powerful thing
Bert Posted September 13, 2007 Posted September 13, 2007 I made a toolbar that works with SciTe. You can find a link for it in my sig. As for exactly what you want, I know you can make a simple script that does a time stamp. You can make a hotsetkey for when SciTe is active to send the time stamp, or add it to the context menu in SciTe. If I remember right, Gary made a tool to configure SciTe...Jos, you can dork slap me if I'm wrong on this.... The Vollatran project My blog: http://www.vollysinterestingshit.com/
Developers Jos Posted September 13, 2007 Developers Posted September 13, 2007 "Assign a single shortcut" WHAT?! How do you do that?! :-D :excited: :"> have a look at au3.properties how all current utilities are started like tidy: # 09 JdeB's Tidy formatting program for Autoit3 command.9.$(file.patterns.au3)="$(SciteDefaultHome)\tidy\tidy.exe" "$(FilePath)" command.name.9.$(file.patterns.au3)=Tidy AutoIt Source command.subsystem.9.$(file.patterns.au3)=0 command.save.before.9.$(file.patterns.au3)=1 command.shortcut.9.$(file.patterns.au3)=Ctrl+T command.is.filter.9.$(file.patterns.au3)=1 Add something like this to SciTEUser.properties and modify it to use a available command number etc .... Information on all these commands can be found in the SciTE4AutoIt3 helpfile ... 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.
Developers Jos Posted September 13, 2007 Developers Posted September 13, 2007 I made a toolbar that works with SciTe. You can find a link for it in my sig. As for exactly what you want, I know you can make a simple script that does a time stamp. You can make a hotsetkey for when SciTe is active to send the time stamp, or add it to the context menu in SciTe. If I remember right, Gary made a tool to configure SciTe...Jos, you can dork slap me if I'm wrong on this....Gary made the CodeSnippet utility that inserts code snippet directly into scite using this same SciTE director mechanism .... is that what you mean ?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.
JohnBailey Posted September 13, 2007 Author Posted September 13, 2007 have a look at au3.properties how all current utilities are started like tidy: # 09 JdeB's Tidy formatting program for Autoit3 command.9.$(file.patterns.au3)="$(SciteDefaultHome)\tidy\tidy.exe" "$(FilePath)" command.name.9.$(file.patterns.au3)=Tidy AutoIt Source command.subsystem.9.$(file.patterns.au3)=0 command.save.before.9.$(file.patterns.au3)=1 command.shortcut.9.$(file.patterns.au3)=Ctrl+T command.is.filter.9.$(file.patterns.au3)=1 Add something like this to SciTEUser.properties and modify it to use a available command number etc .... Information on all these commands can be found in the SciTE4AutoIt3 helpfile ... Jos Thanks! A decision is a powerful thing
JohnBailey Posted September 14, 2007 Author Posted September 14, 2007 Thanks guys for the discussion and ideas! I'm enjoying it. I went with Jos' idea. Volly your toolbar seems pretty neat A decision is a powerful thing
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