Author Topic: Variable used with HippoEDIT  (Read 3955 times)

Offline Stefan

  • Administrator
  • Hero Member
  • *****
  • Posts: 775
  • Karma: +6/-0
    • View Profile
Variable used with HippoEDIT
« on: October 03, 2009, 09:59:14 pm »
Variable used with HippoEDIT


ongoing thread ... will be formated later, and also add links to existing threads about this topic.


       
-
%DateTime%should be -- 03.10.2009 22:03:07 -- i think, but gives only 22:03:07
-
%Date%current date => 03.10.2009
-
%DateTime%current time => 22:03:07
-
%Year%current year => 2009
-
%Month%current month => 10
-
%Day%current day => 04
-
%FileDate%Last modification date of current document
-
%FileTime%Last modification time of current document
-
%CurrentWord%current word under cursor
    Example: anyword    
-
%CurrentLine%current number of the line where the cursor is in
    Example: 12    
-
%CurrentColumn%current number of the column where the cursor is in
    Example: 72
-
%Clipboard%current content of the clipboard
    Example:  example clipboard content  
-
%[ ]%returns an Registry Value
Example of use:
%[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\IEXPLORE.EXE]%
Returns:  C:\Programme\Internet Explorer\IEXPLORE.EXE
-
%SelectedText%current selected text
    Example:  selected word, words, line or lines  
-
%Document%name of current document
    Example: filename.ext  
-
%FileNameWOExt%base name of current document without the extension
    Example: filename  
-
%FileName%name of current document incl. the path %FileDir%
    Example: X:\folder\path\filename.ext  
-
%FileDir%Path of current file
    Example: X:\folder\path  
-
%OpenFiles%insert an space separated  string with currently open files at the current place into the document or given as parameter to an external tool
    Example: X:\folder\filename.ext "Y:\folder name\file name.ext" Z:\test\a\b\file.ext  
-
%|%to place the cursor at an wished position
    Example: after inserting the template FOR x = 1 TO %|%  the cursor is placed on the place of %|%
-
%Variable name%named 'Interactive' in context menu => prompt the user with an dialog to insert an string to be inserted at the current place into the document or given as parameter to an external tool
Example of use: after inserting an template like %Test% user is prompted by an dialog labeled with 'Test' where he can enter an string
-
%InteractiveFile%prompt the user with an dialog to select a  file. The path and file name will be inserted at the current place into the document or given as parameter to an external tool
-
%InteractiveDir%prompt the user with an dialog to select an directory. This path will be inserted at the current place into the document or given as parameter to an external tool
-
%OpenFilesInteractive%prompt the user with an list of currently opened files. The user can select one or more to feed them as parameter to an external tool
-
%AppDir%current path to the  folder with the HippoEdit.exe
    Example: X:\path\HippoEDIT  
-
%AppDrive%current drive which holds the  folder with the HippoEdit.exe
    Example: X:  
-
%AppDataDir%current path to the HippoEdit data folder
    Example: X:\path\HippoEDIT\Data  
-
%% the symbol % itself
    Example: if you want to insert an %-sign itself. F.ex. for *.CMD Batch files, if you want to create an template like ECHO %1 %2 you have to write this as ECHO %%1  %%2
-
   
-
   
-
   
-



%ProjectFiles% Project Files
%ProjectDir% Project work dir
%MainFile%Project Main File Name
%MainFilePath% Project Main File Path
%MainFileDir%Main Project File Directory
%ProjectFilesInteractive%









Environment Vars from your computer
%ComSpec% => C:\WINDOWS\system32\cmd.exe
%FP_NO_HOST_CHECK%
%NUMBER_OF_PROCESSORS%
%OS%
%Path%
%PATHEXT%
%PROCESSOR_xxx%
%TEMP% => C:\DOKUME~1\<CurrentUserName>\LOKALE~1\Temp
%TMP% => usely the same as TEMP
%windir% => C:\WINDOWS

You can test this env vars in an DOS-Box with the echo-command like:
C:\>echo %ComSpec%

or by using the command set:
C:\>set

then you will find more env vars to use with HippoEDIT:

ALLUSERSPROFILE=C:\Dokumente und Einstellungen\All Users
APPDATA=C:\Dokumente und Einstellungen\<CurrentUserName>\Anwendungsdaten
CommonProgramFiles=C:\Programme\Gemeinsame Dateien
COMPUTERNAME=myPC
ComSpec=C:\WINDOWS\system32\cmd.exe
FP_NO_HOST_CHECK=NO
HOMEDRIVE=C:
HOMEPATH=\Dokumente und Einstellungen\<CurrentUserName>
LOGONSERVER=\\myPC
NUMBER_OF_PROCESSORS=1
OS=Windows_NT
Path=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Python31
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_IDENTIFIER=x86 Family 6 Model 9 Stepping 5, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=0905
ProgramFiles=C:\Program Files
PROMPT=$P$G
SESSIONNAME=Console
SystemDrive=C:
SystemRoot=C:\WINDOWS
TEMP=C:\DOKUME~1\<CurrentUserName>\LOKALE~1\Temp
TMP=C:\DOKUME~1\<CurrentUserName>\LOKALE~1\Temp
USERDOMAIN=myPC
USERNAME=<CurrentUserName>
USERPROFILE=C:\Dokumente und Einstellungen\<CurrentUserName>
windir=C:\WINDOWS


Happy HippoEDITing   ;D

Find me:
var
vars
variable
variables
variablen
« Last Edit: October 04, 2009, 12:56:57 pm by Stefan »
Stefan, HippoEDIT beta tester 
HippoEDIT - the editor programmers wants to code thyself when they are dreaming.        -Don't just edit. HippoEDIT!-

Offline Stefan

  • Administrator
  • Hero Member
  • *****
  • Posts: 775
  • Karma: +6/-0
    • View Profile
Re: Variable used with HippoEDIT
« Reply #1 on: October 04, 2009, 01:16:08 pm »
Some more vars, here for creating date strings,
currently only support in "def_spec.xml"
as like:
<Insert format="%d.%m.%Y %H:%M"/>  Read more...

This vars should be accessible everywhere inside of HE too.


    %a        Abbreviated weekday name
    %A        Full weekday name
    %b        Abbreviated month name
    %B        Full month name
    %c        Date and time representation appropriate for locale
    %d        Day of month as decimal number (01 – 31)
    %H        Hour in 24-hour format (00 – 23)
    %I        Hour in 12-hour format (01 – 12)
    %j        Day of year as decimal number (001 – 366)
    %m        Month as decimal number (01 – 12)
    %M        Minute as decimal number (00 – 59)
    %p        Current locale's A.M./P.M. indicator for 12-hour clock
    %S        Second as decimal number (00 – 59)
    %U        Week of year as decimal number, with Sunday as first day of week (00 – 53)
    %w        Weekday as decimal number (0 – 6; Sunday is 0)
    %W        Week of year as decimal number, with Monday as first day of week (00 – 53)
    %x        Date representation for current locale
    %X        Time representation for current locale
    %y        Year without century, as decimal number (00 – 99)
    %Y        Year with century, as decimal number
    %z, %Z
   
   %#c
  %#x
 %#d
 %#H
 %#I
 %#j
 %#m
 %#M
 %#S
 %#U
 %#w
 %#W
 %#y
 %#Y

Offline Stefan

  • Administrator
  • Hero Member
  • *****
  • Posts: 775
  • Karma: +6/-0
    • View Profile
Re: Variable used with HippoEDIT
« Reply #2 on: October 04, 2009, 01:34:31 pm »
First try to reorganize the vars, here brainstorming only!!!  
This reorganization will not be done before HippoEDIT v 1.5.

So we have enough time to think about it.
Any suggestion are welcome, please reply with your opinion.





       
-
%DateTime%%DTIME% == %D% %T%
-
%Date%%D%
-
%DateTime% => %Time%%T%
-
%Year%%YY% = 2009
%Year% %Y% = 09
-
%Month%%M%
-
%Day%%D%
-
%Hour%%H% (new)
-
%Minute%%Min% (new)
-
%Seconde%%Sec% (new)
-
%FileDate%%FDate%
-
%FileTime%%FTime%
-
%CurrentWord% => %Word%%W%
-
%CurrentLine% => %Line%%L%
-
%CurrentColumn% => %Column%%C%
-
%Clipboard%%CP%
-
%[ ]%
-
%SelectedText% => %Selection%%S%
-
%Document% => %FileName%%F%
-
%FileNameWOExt% => %FileBase%%FB%
-
%FileName% => %FullName%%FN%
-
%FileExt%%FE%
-
%FileDir% => %FilePath%%FP%
-
%OpenFiles%%OF%
-
%|%
-
%Variable name%
-
-
%InteractiveFile%%IF%
-
%InteractiveDir%%ID%
-
%OpenFilesInteractive% => %InteractiveFilesOpen%  %IFO%
-
-
%AppDir%AD
-
%AppDrive%ADR
-
%AppDataDir%ADD
-
%% the symbol % itself


DTIME - 01.02.1980 13:45
D - 01.02.1980
T - 13:45
YY - 1980
Y - 80
M - 02
D - 01
H - 13
Min - 45
Sec - 33
FDate - 31.12.2008
FTime - 23:59
W - word
L - line#
C - column#
CP - clip
S - selection
F - filename.ext
FB or B - filename
FN - X:\path\filename.ext
FE or E - ext
FP - X:\path
OF - open files
IF - interactive file
ID - interactive dir
IFO - interactive open files
AD - app dir of HE, X:\path\HE
ADR - drive of app dir, X:
ADD - data folder of HE, X:\path\HE\data


I have made vars that are not that important a bit longer,
to save short var names if we need them for later use.
Just an first try.........
« Last Edit: October 04, 2009, 01:40:46 pm by Stefan »

Offline Arthur

  • Registered User
  • Hero Member
  • *
  • Posts: 653
  • Karma: +1/-0
  • He who is ashamed of asking is afraid of learning.
    • View Profile
    • My Blog
Re: Variable used with HippoEDIT
« Reply #3 on: October 04, 2009, 08:48:41 pm »
IMHO
%Month% %M%
-  should also include %MM% notation for say Feb as 02 and %M% for 2
%Day% %D%
-  same as above
%Hour% %H% (new)
- should be as above with an option to display the hours in North American notation e.g. 03:40 PM

Offline alex

  • Developer
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2184
  • Karma: +37/-3
    • View Profile
    • HippoEDIT
Re: Variable used with HippoEDIT
« Reply #4 on: October 05, 2009, 01:25:38 pm »
Probably we can also use case sensitive vars as Y and y for some cases (in addition to multi chars), it can save characters ;) But do not not is it intuitive enough.

and also maybe we can take into account to have for some mostly used vars short form and for some rare used long form, but more explanatory. But here I am not sure, what would be better...

 

Related Topics

  Subject / Started by Replies Last post
0 Replies
2343 Views
Last post January 02, 2009, 12:21:26 pm
by alex
7 Replies
8205 Views
Last post May 04, 2009, 12:48:26 pm
by JJK
8 Replies
6176 Views
Last post January 21, 2012, 03:28:51 am
by alex
1 Replies
4625 Views
Last post July 16, 2009, 10:41:26 am
by alex
3 Replies
1881 Views
Last post November 09, 2017, 12:04:23 am
by alex