if you have large scripts, it is often usefull to make a description for some variables ( i.e. you have an array and make comments for types of data in rows and columns ).
But if you need this information, you must scroll back to this comment and read it.
Now i've made a script, that searchs this comment for the current variable (on which the cursor is) and write this to console output.
Edit 2012-03-04: Now you can show it also as CallTip. Switch between calltip or console output by settings in properties (see instructions in header)
current version: v0.2
Edit 2012-03-05: Added: Multiline Tips with "n" as line break
current version: v0.3
Edit 2012-03-08: Added: Refers to created variable in line before with:
current version: v0.4
Edit 2012-03-12: Script now totally rebuild.
It can also be variables of the same name used on several occasions (in different functions). The creation of the tips have to be done within the same range of validity (in the same function or global). The script is looking for tips for the current variable in the current scope.
It will always output the variable name and scope
$VarBefore [ Global ]
This is the tip for $VarBefore
or
$iSelf [ Local: Func _Testfunc() ]
This is the tip for $iSelf
Now it is also possible to use all kinds of tip creation (tip in [multiple] region, tip with "at", tip with "-1") at the same time. Because that, the properties entrie "Variables.Tip.Region.*.au3" is needless.
current version: v0.5
Edit 2012-04-17:
Added: Installer.au3
- all required changes in SciTEUser.properties made by installer
- detects automatically free command number
- GUI to configure settings
- you can add an entry to context menu too
Put both files (VarGetTip.lua and Install_VarGetTip.au3) together in an directory, than run au3-script.
Edit 2012-04-20:
There was a little bug in the installer.au3. So it hasn't take effect to check "show tip as call tip".
Fixed.
Edit 2012-05-06: NEW
Now you can also use tip for functions, that you've created inside your script.
Use it so:
current version: v0.6
---------------------------------------------------------------------------------------------------------------------------------- -- VarGetTip -- For variables in a separate area of the script deposited tips: -- #region - Variables-Tip -- ; $Variable1 This is the tip for variable 1 -- ; $Variable2 This is the tip for variable 2 -- ; $Variable3 This is the tip for variable 3 -- #endregion -- or they are in a comment line with a tag (the "at" sign) somewhere in the script created: -- ;@ $Variable1 This is the tip for variable 1 -- or direct after creation of a variable in the next line with '-1' refers to this: -- $Variable -- ;-1 here my tip for $Variable -- -- or tip for functions: -- In following line after function-headline write your tip: -- Func _SomeFunc() -- ;-f Tip for this functionnSecond line of this tip -- Output: -- _SomeFunc( ) -- Tip for this function -- Second line of this tip -- -- It can also be variables of the same name used on several occasions (in different functions). -- The creation of the tips have to be done within the same range of validity (in the same function or global). -- The script is looking for tips for the current variable in the current scope. -- It will always output the variable name and scope (if tip exists) -- $VarBefore [ Global ] -- This is the tip for $VarBefore -- or -- $iSelf [ Local: Func _Testfunc() ] -- This is the tip for $iSelf -- -- You can create multiline tips by using "n" to mark the line break -- i.e. -- ;@ $VariableXY comment1ncomment2ncomment3 -- output: -- $VariableXY -- comment1 -- comment2 -- comment3 -- -- Save the script as "..SciTELUAVarGetTip.lua" -- -- In "SciTEUser.properties" will create a hotkey to invoke the function -- command.name.37.*.au3=Variables Tip -- command.37.*.au3=dofile $(SciteDefaultHome)/Lua/VarGetTip.lua -- command.mode.37.*.au3=subsystem:lua,savebefore:no -- command.shortcut.37.*.au3=Ctrl+Alt+V -- -- In addition, create a properties value that determines whether output to console or Calltip -- Variables.Tip.CallTip.*.au3=1 (1=as CallTip, 0=output to console) -- -- Usage -- - Place the cursor on the variable/function-call (or touching them) -- - Call the Hotkey -- - If existing a tip, it will shown as calltip or written to console ----------------------------------------------------------------------------------------------------------------------------------
DL before: 54
Attached Files
Edited by BugFix, 06 May 2012 - 07:10 PM.









