Search This Blog

2007-02-24

Word shortcuts

I had to use Word lately extensively (for writing my thesis or pretending to do so ... )

so here some of the shortcuts , which might be useful for someone (I really do not use all of those ; )


Command Name Shortcut Keys
------------------------------------------------------------------------

All Caps CTRL+SHIFT+A
Annotation ALT+CTRL+M
App Maximize ALT+F10
App Restore ALT+F5
Apply Heading1 ALT+CTRL+1
Apply Heading2 ALT+CTRL+2
Apply Heading3 ALT+CTRL+3
Apply List Bullet CTRL+SHIFT+L
Auto Format ALT+CTRL+K
Auto Text F3 or ALT+CTRL+V
Bold CTRL+B or CTRL+SHIFT+B
Bookmark CTRL+SHIFT+F5
Browse Next CTRL+PAGE DOWN
Browse Previous CTRL+PAGE UP
Browse Sel ALT+CTRL+HOME
Cancel ESC
Center Para CTRL+E
Change Case SHIFT+F3
Char Left LEFT
Char Left Extend SHIFT+LEFT
Char Right RIGHT
Char Right Extend SHIFT+RIGHT
Clear DELETE
Close or Exit ALT+F4
Close Pane ALT+SHIFT+C
Column Break CTRL+SHIFT+ENTER
Column Select CTRL+SHIFT+F8
Copy CTRL+C or CTRL+INSERT
Copy Format CTRL+SHIFT+C
Copy Text SHIFT+F2
Create Auto Text ALT+F3
Customize Add Menu ALT+CTRL+=
Customize Keyboard ALT+CTRL+NUM +
Customize Remove Menu ALT+CTRL+-
Cut CTRL+X or SHIFT+DELETE
Date Field ALT+SHIFT+D
Delete Back Word CTRL+BACKSPACE
Delete Word CTRL+DELETE
Dictionary ALT+SHIFT+F7
Do Field Click ALT+SHIFT+F9
Doc Close CTRL+W or CTRL+F4
Doc Maximize CTRL+F10
Doc Move CTRL+F7
Doc Restore CTRL+F5
Doc Size CTRL+F8
Doc Split ALT+CTRL+S
Double Underline CTRL+SHIFT+D
End of Column ALT+PAGE DOWN
End of Column ALT+SHIFT+PAGE DOWN
End of Doc Extend CTRL+SHIFT+END
End of Document CTRL+END
End of Line END
End of Line Extend SHIFT+END
End of Row ALT+END
End of Row ALT+SHIFT+END
End of Window ALT+CTRL+PAGE DOWN
End of Window Extend ALT+CTRL+SHIFT+PAGE DOWN
Endnote Now ALT+CTRL+D
Extend Selection F8
Field Chars CTRL+F9
Field Codes ALT+F9
Find CTRL+F
Font CTRL+D or CTRL+SHIFT+F
Font Size Select CTRL+SHIFT+P
Footnote Now ALT+CTRL+F
Go Back SHIFT+F5 or ALT+CTRL+Z
Go To CTRL+G or F5
Grow Font CTRL+SHIFT+.
Grow Font One Point CTRL+]
Hanging Indent CTRL+T
Header Footer Link ALT+SHIFT+R
Help F1
Hidden CTRL+SHIFT+H
Hyperlink CTRL+K
Indent CTRL+M
Italic CTRL+I or CTRL+SHIFT+I
Justify Para CTRL+J
Left Para CTRL+L
Line Down DOWN
Line Down Extend SHIFT+DOWN
Line Up UP
Line Up Extend SHIFT+UP
List Num Field ALT+CTRL+L
Lock Fields CTRL+3 or CTRL+F11
Macro ALT+F8
Mail Merge Check ALT+SHIFT+K
Mail Merge Edit Data Source ALT+SHIFT+E
Mail Merge to Doc ALT+SHIFT+N
Mail Merge to Printer ALT+SHIFT+M
Mark Citation ALT+SHIFT+I
Mark Index Entry ALT+SHIFT+X
Mark Table of Contents Entry ALT+SHIFT+O
Menu Mode F10
Merge Field ALT+SHIFT+F
Microsoft Script Editor ALT+SHIFT+F11
Microsoft System Info ALT+CTRL+F1
Move Text F2
New CTRL+N
Next Cell TAB
Next Field F11 or ALT+F1
Next Misspelling ALT+F7
Next Object ALT+DOWN
Next Window CTRL+F6 or ALT+F6
Normal ALT+CTRL+N
Normal Style CTRL+SHIFT+N or ALT+SHIFT+CLEAR (NUM 5)
Open CTRL+O or CTRL+F12 or ALT+CTRL+F2
Open or Close Up Para CTRL+0
Other Pane F6 or SHIFT+F6
Outline ALT+CTRL+O
Outline Collapse ALT+SHIFT+- or ALT+SHIFT+NUM -
Outline Demote ALT+SHIFT+RIGHT
Outline Expand ALT+SHIFT+=
Outline Expand ALT+SHIFT+NUM +
Outline Move Down ALT+SHIFT+DOWN
Outline Move Up ALT+SHIFT+UP
Outline Promote ALT+SHIFT+LEFT
Outline Show First Line ALT+SHIFT+L
Overtype INSERT
Page ALT+CTRL+P
Page Break CTRL+ENTER
Page Down PAGE DOWN
Page Down Extend SHIFT+PAGE DOWN
Page Field ALT+SHIFT+P
Page Up PAGE UP
Page Up Extend SHIFT+PAGE UP
Para Down CTRL+DOWN
Para Down Extend CTRL+SHIFT+DOWN
Para Up CTRL+UP
Para Up Extend CTRL+SHIFT+UP
Paste CTRL+V or SHIFT+INSERT
Paste Format CTRL+SHIFT+V
Prev Cell SHIFT+TAB
Prev Field SHIFT+F11 or ALT+SHIFT+F1
Prev Object ALT+UP
Prev Window CTRL+SHIFT+F6 or ALT+SHIFT+F6
Print CTRL+P or CTRL+SHIFT+F12
Print Preview CTRL+F2 or ALT+CTRL+I
Proofing F7
Redo ALT+SHIFT+BACKSPACE
Redo or Repeat CTRL+Y or F4 or ALT+ENTER
Repeat Find SHIFT+F4 or ALT+CTRL+Y
Replace CTRL+H
Reset Char CTRL+SPACE or CTRL+SHIFT+Z
Reset Para CTRL+Q
Revision Marks Toggle CTRL+SHIFT+E
Right Para CTRL+R
Save CTRL+S or SHIFT+F12 or ALT+SHIFT+F2
Save As F12
Select All CTRL+A or CTRL+CLEAR (NUM 5) or CTRL+NUM 5
Select Table ALT+CLEAR (NUM 5)
Show All CTRL+SHIFT+8
Show All Headings ALT+SHIFT+A
Show Heading1 ALT+SHIFT+1
Show Heading2 ALT+SHIFT+2
Show Heading3 ALT+SHIFT+3
Show Heading4 ALT+SHIFT+4
Show Heading5 ALT+SHIFT+5
Show Heading6 ALT+SHIFT+6
Show Heading7 ALT+SHIFT+7
Show Heading8 ALT+SHIFT+8
Show Heading9 ALT+SHIFT+9
Shrink Font CTRL+SHIFT+,
Shrink Font One Point CTRL+[
Small Caps CTRL+SHIFT+K
Space Para1 CTRL+1
Space Para15 CTRL+5
Space Para2 CTRL+2
Spike CTRL+SHIFT+F3 or CTRL+F3
Start of Column ALT+PAGE UP
Start of Column ALT+SHIFT+PAGE UP
Start of Doc Extend CTRL+SHIFT+HOME
Start of Document CTRL+HOME
Start of Line HOME
Start of Line Extend SHIFT+HOME
Start of Row ALT+HOME
Start of Row ALT+SHIFT+HOME
Start of Window ALT+CTRL+PAGE UP
Start of Window Extend ALT+CTRL+SHIFT+PAGE UP
Style CTRL+SHIFT+S
Subscript CTRL+=
Superscript CTRL+SHIFT+=
Symbol Font CTRL+SHIFT+Q
Thesaurus SHIFT+F7
Time Field ALT+SHIFT+T
Toggle Field Display SHIFT+F9
Toggle Master Subdocs CTRL+\
Tool SHIFT+F1
Un Hang CTRL+SHIFT+T
Un Indent CTRL+SHIFT+M
Underline CTRL+U or CTRL+SHIFT+U
Undo CTRL+Z or ALT+BACKSPACE
Unlink Fields CTRL+6 or CTRL+SHIFT+F9
Unlock Fields CTRL+4 or CTRL+SHIFT+F11
Update Auto Format ALT+CTRL+U
Update Fields F9 or ALT+SHIFT+U
Update Source CTRL+SHIFT+F7
VBCode ALT+F11
Web Go Back ALT+LEFT
Web Go Forward ALT+RIGHT
Word Left CTRL+LEFT
Word Left Extend CTRL+SHIFT+LEFT
Word Right CTRL+RIGHT
Word Right Extend CTRL+SHIFT+RIGHT
Word Underline CTRL+SHIFT+W

Windows best shortcuts revised

various sources
This material has been copied from various sources so no offence!
ALT + TAB
Move between active applications.
WINKEY + M
This will clear your desktop in an instant by minimizing all active applications.
WINKEY + E =
Opens explorer windows with the folder sidebar enabled
WINKEY + D
This will also clear your desktop, however if you press WINKEY + D once more the applications will reappear.
WINKEY + L
This will lock the computer; you will still have to unlock it by pressing CTRL+ALT DELETE.
WINKEY + F
This will open the search assistant.
WINKEY + R
This will open the RUN command prompt.
WINKEY + B
Sets focus on the task bar, you can navigate by using the arrow keys; press ENTER to open one of the applications. You can't really see which icon is selected, but just wait a moment and the application info text will appear. If you press TAB the focus will be set on the desktop.
----
The following shortcuts will work in almost any office application environment; I am especially pleased to use them when I browse the web.
CTRL + O (CTRL + L)
This will open the location field. In Internet Explorer you can use this to type in a web address.
CTRL + N
This will open a new application window, either an empty window or a clone.
In Internet Explorer the new window will show the same URL. So it is useful if you want to maintain the old browser window, and not having to leave the keyboard to open another browser window.
CTRL + TAB
Use this short cut to move between tab panes, use CTRL + SHIFT + TAB to move in reverse order.
Some Shortcut Keys you might enjoy
Windows XP is full of many KEY-Combo Shortcuts to access Feasures quickly. Here are some of the shortcuts you may find most useful.
WINKEY + PAUSE/BREAK =
Opens "system propertieS"
SHIFT + DELETE =
Delete a file without sending to Recycler first (NO RECOVERY!)
F5 =
Refresh (Usefull in Internet Explorer)
SHIFT F5 =
Reload Webpage from scratch (NO CACHE)
CTRL + SHIFT + END =
Highlight everything down a Text page from current possition (USE HOME for up)
ALT + CTRL + DEL =
Ahh, an old favorite. If an App. is being rude, use this to bring the the "Task Manager" (and kill it if you want). There is some other toys here too like, priorities you can set.
Search "Shortcut keys" under "HELP & SUPPORT" for a complete list of Shortcuts, including these.
for cmd
F7 - displays the history of the commands which have been used
Ctrl + Shift + ESC : Run Task Manager

SUPER COOL utility for ... . windows to be listed, moved, resized, renamed, hidde

SOURCES:
http://www.commandline.co.uk/cmdow/

How to run commands on Windows XP each n minutes on each n day and other for plays

:: THIS WOULD RUN THE BAT FILE EACH 15th minutes

for /L %h in (0,1,23) do for /L %m in (0,15,45) do AT %h:%m /EVERY:M,T,W,TH,F "C:\path\ToMyScheduledBatFile.cmd"

::THIS RESTART YOUR COMPUTER ONES IN A HOUR AT XX:55 EACH DAY
for /L %h in (0,1,23) do for /L %m in (55,1,55) do AT %h:%m /EVERY:M,T,W,TH,F shutdown -f -r -t 00


:: GENERATE THE NUMBERS FROM 1 TILL 1000 ON TEXTPAD (CHECK OUT THE USING TEXTPAD AS COMMANDLINER
@echo off&for /L %n in (1,1,10000) do @echo %n
::GENERATE THE NUMBERS FROM 1 TILL 1000 BUT EACH 7 TH ONE
@echo off&for /L %n in (0,7,10000) do @echo %n


:: GET ALLMOST WINDOWS XP COMMANDS HELP
for /f "tokens=1 delims= " %f in ('help') do for /f "delims=" %n in ("%f") do %n /?

2007-02-14

2007-02-11

Simple back-up of my blog

wget -r http://www.my.blog.url.com
::or cheat the server ..
wget -r --user-agent="Internet Explorer" http://ysgitdiary.blogspot.com/

2007-02-09

Using gmail as a virtual drive

SOURCES:
http://www.majorgeeks.com/download4405.htm

1. Get gmail
2. install GMail Drive
3. You will get web 2.8 free web storage .... (see attachments )
Only restriction single file size < 10 MB

Havn't tested it yet extensively - first couple of times - seems to work fine ...
I can live with that

GMail Drive 1.0.10

Textpad quick reference by John Bokma. For the latest version:

Command Results
Stop the tool running in the command window c-Break
Hypertext jump in Command Results window Enter
Hypertext jump to next item in Command Results window F4
Hypertext jump to previous item in Command Results window s-F4
Activate the Command Results window c-F11
Views
Activate next view F6
Activate previous view s-F6
Help
In-context help F1
Invoke in-context help cursor s-F1
Miscellaneous
Activate the Clip Library a-0
Show or hide the Clip Library c-F3
Display in-context properties dialog box a-Enter
Activate the main menu F10
Popup the in-context document menu s-F10 or right mouse
Popup the insert date/time menu c-F10 or c-right mouse
Display the Preferences dialog box c-Q-P
Regular Expressions (POSIX)
. Any single character.
[ ] Any one of the characters in the brackets, or any of a
range of characters separated by a hyphen (-), or a
character class operator (see below).
[^] Any characters except for those after the caret "^".
^ The start of a line (column 1).
$ The end of a line (not the line break characters).
\< The start of a word.
\> The end of a word.
\t The tab character.
\f The page break (form feed) character.
\n A new line character, for matching expressions that span
line boundaries. This cannot be followed by operators
'*', '+' or {}. Do not use this for constraining matches to
the end of a line. It's much more efficient to use "$".
\xdd "dd" is the two-digit hexadecimal code for any
character.
( ) Groups a tagged expression to use in replacement
expressions. An RE can have up to 9 tagged
expressions.
* Matches zero or more preceding characters/expressions.
? Matches zero or one preceding characters/expressions.
+ Matches one or more preceding characters/ expressions.
{count} Matches the specified number of the preceding
characters or expressions.
{min,} Matches at least the specified number of the preceding
characters or expressions.
{min,max} Matches between min and max of the preceding
characters or expressions.
| Matches either the expression to its left or its right.
\ "Escapes" the special meaning of the above expressions,
so that they can be matched as literal characters.
[:alpha:] Any letter.
[:lower:] Any lower case letter.
[:upper:] Any upper case letter.
[:alnum:] Any digit or letter.
[:digit:] Any digit.
[:xdigit:] Any hexadecimal digit (0-9, a-f or A-F).
[:blank:] Space or tab.
[:space:] Space, tab, vertical tab, return, line feed, form feed.
[:cntrl:] Control characters (Delete and ASCII codes less than
space).
[:print:] Printable characters, including space.
[:graph:] Printable characters, excluding space.
[:punct:] Anything that is not a control or alphanumeric character.
[:word:] Letters, hypens and apostrophes.
[:token:] Any of the characters defined on the Syntax page for the
document class, or in the syntax definition file if syntax
highlighting is enabled for the document class.
Replacement Expressions
& Substitute the text matching the entire search pattern.
\0 to \9 Substitute the text matching tagged expression 0 through
9. \0 is equivalent to &.
\f Substitute a page break (form feed).
\i Substitute a sequence number.
\n Substitute a newline.
\p Substitute the contents of the clipboard.
\t Substitute a tab.
\xdd Substitute the character with hex code dd (must be 2 hex
digits, excluding 00).
\u Force the next substituted character to be in upper case.
\l Force the next substituted character to be in lower case.
\U Force all subsequent substituted characters to be in
upper case.
\L Force all subsequent substituted characters to be in
lower case.
\E or \e Turns off previous \U or \L.
Tool Parameter Macros
$File The fully qualified filename of the current
document.
$DOSFile Same as $File, except that DOS aliases are
substituted for any long names in the path, and
characters are converted to the DOS (OEM) code
set.
$UNIXFile Same as $File, except any '\' characters are
changed to '/'.
$FileName The simple filename of the current document.
$BaseName $FileName stripped of any extension.
$DOSBaseName Same as $BaseName, except that the DOS alias
is substituted for a long file name, and characters
are converted to the DOS (OEM) code set.
$WspBaseName The workspace filename, stripped of any path
and extension.
$FileDir The drive and directory of the current document.
$WspDir The drive and directory of the current workspace
file.
$FilePath The directory of the current document, stripped
of the drive.
$UnixPath Same as $FilePath, except any '\' characters are
changed to '/'.
$Dir The current working drive and directory.
$UNIXDir Same as $Dir, except any '\' characters are
changed to '/'.
$Line The cursor line within the current document.
$Col The cursor column within the current document.
$Prompt Prompt for a value to substitute for $Prompt. If it
is followed by a string in brackets, that string
will be displayed in the prompt dialog box.
$Password Prompt for a value to substitute for $Password.
The value will not be echoed as it is typed. If it is
followed by a string in brackets, that string will
be displayed in the prompt dialog box.
$Sel Selected text in the active document. This is
limited to the first line in a multi-line selection.
$SelLine The text on the line containing the cursor. This
has the side effect of selecting that line.
$SelWord The word containing the cursor. This has the side
effect of selecting that word.
$Clip Selected text in the active document, or the
whole document if nothing is selected, is copied
to the clipboard before running the tool.
$AppWnd The handle of the main application window. This
is a decimal number.
$DocWnd The handle of the active document's window.
This is a decimal number.
$Encoding The characters encoding of the active document.
This is of the forms: windows-ddd (or cpddd for
DOS), UTF-8, UTF16-LE or UTF-16BE, where
ddd is a code page number.
Page Header/Footer Macros
The normal font for subsequent text &n
A bold font for subsequent text &b
An italic font for subsequent text &i
A bold italic font for subsequent text &I
Subsequent text to be left justified &l
Subsequent text to be centered (this is the default) &c
Subsequent text to be right justified &r
The current date in Windows short form &d
The current date in Windows long form &D
The current time in Windows format &t
The filename, excluding its path &f
The full filename, including its path &F
The page number &p
The total number of pages &P
Based on the TextPad help file. Edited by freelance programmer
John Bokma. For the latest version: http://johnbokma.com/textpad/

2007-02-08

writing NSIS scripts with TextPad

This assumes you installed NSIS with default settings if not search the makensis.exe and apply its path:
Add new DOS commad:
Parameters:"C:\Program Files\NSIS\makensis.exe" /V4 $FileName
Initial Folder:$FileDir
check: Save All Documents first
check: Capture output
Regex to match output:
^.+in script "(.+)" on line ([0-9]+)[.,]?
Registers:
File 1 Line 2

For the laziest (on your own risk ; ).Change the num of tools also ; )
===================COPY PASTE START
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Helios\TextPad 4\Tools\13]
"Properties"=hex:01,00,00,00,68,80,00,00,e8,49,00,00
"MenuText"="\"C:\\Program Files\\NSIS\\makensis.exe\" /V4 $FileName"
"Command"="cmd.exe"
"Parameters"="\"C:\\Program Files\\NSIS\\makensis.exe\" /V4 $FileName"
"Folder"="$FileDir"
"RE"="^.+in script \"(.+)\" on line ([0-9]+)[.,]?"
===================COPY PASTE END

AWESOME ! CONFIGURE TEXTPAD FOR GOOGLE SEARCH

REPLACE DIFFERENT OPERA PATH IF YOU HAVE ANY


Command:C:\Program Files\Opera\Opera.exe
Parameters:http://www.google.com/search?hl=en&client=opera&rls=en&hs=pun&q="$SEL"
Starting folder : C:\Program Files\Opera\

OK HERE THE COPY PASTE OF THE REG FILE FOR THE MOST LAZY ONES (ON YOUR OWN RISK !!! )
=====================COPY PASTE START
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Helios\TextPad 4\Tools\19]
"Properties"=hex:00,00,00,00,69,80,00,00,40,00,00,00
"MenuText"="GoogleItWithOpera"
"Command"="C:\\Program Files\\Opera\\Opera.exe"
"Parameters"="http://www.google.com/search?hl=en&client=opera&rls=en&hs=pun&q=\"$SEL\""
"Folder"="C:\\Program Files\\Opera\\"
"RE"=""

=====================COPY PASTE STOP

EXPORT AND IMPORT TEXTPAD SETTINGS AND SYNTAX FILES

::EXPORT TEXTPAD SETTINGS
@echo off
REM This tool makes a complete backup of all your TextPad settings
REM in the Windows Registry.
REM The area of useage is quite wide. You can make custom "workspaces"
REM trough launching different .reg-files. Also, you may set the "prompt for parameters"
REM checkbox in textpad. Also, "Capture output" & "supress until..." sould be checked.
REM
REM In the "Parameters" textfield you can type in the deafult name for a
REM backup. ex: "texpad.reg" or "c:\textpad.reg"
REM
REM As the "initial folder" you can type in a default value, leave it blank or use $FileDir
REM © 2002 Rasmus Andersson [flajm.com / rasmusandersson.com]
REM ADDED DOUBLE EXPORT FOR CURRENT SETTINGS ALSO
REM Yordan Georgiev


REM Dim vars
set KEYPATH=HKEY_CURRENT_USER\Software\Helios\TextPad 4
set BUFILENAME=tps__%date%.reg
set CurrentSettings =CurrentSettings.reg

REM check for errors
:DOCHECK
if "%BUFILENAME%"=="" goto :REPORTERROR


:DOBACKUP
REG EXPORT "%KEYPATH%" "%BUFILENAME%"
::BACKUP THE LATEST SETTINGS INTO SEPARATE FILE
REG EXPORT "%KEYPATH%" "%CurrentSettings%"
::CREATE A FOLDER FOR THE SYNTAX FILE
mkdir textpad_system
::NOW COPY ALL THE SYN FILES INTO
copy /y "C:\Program Files\TextPad 4\system\*.syn" "%cd%\textpad_system"

REM Report success
:SUCCESS
echo Registry backup of "%KEYPATH%"
echo successfully saved to "%BUFILENAME%"
goto :ENDBAT


REM reports an error
:REPORTERROR
echo You must specify an output filename for the
echo backup.
echo Example: c:\appbackup.reg, textpad.reg, \\computer\folder\backup.reg


REM Exits and quits
:ENDBAT
EXIT


::IMPORT_TEXTPAD_SETTINGS.cmd
:: SHOULD BE THE SAME NAME AS THE ONE IN BACK UP TEXTPAD BATCH
REM FILE IMPORT_TEXTPAD_SETTINGS.cmd
REM This tool makes a imports the backup of all your TextPad settings
REM in the Windows Registry.
REM COURTESY TO EXPORT VERSION OF
REM © 2002 Rasmus Andersson [flajm.com / rasmusandersson.com]
REM ADDED SIMPLE IMPORT
REM Yordan Georgiev

set CurrentSettings =CurrentSettings.reg
REG IMPORT "%CurrentSettings%"
copy /y "%cd%\textpad_system\*.syn" "C:\Program Files\TextPad 4\system"

2007-02-06

Use Google Desktop as command line utility

1.Download Google Desktop - google - download - google Desktop
2. Train it a bit - after one repetitioin it starts to learn and quess what are you searching for
3. Check the mark from Preferences to remove files, which are deleted
4. Use it ! - Double Control key and type the name of the cmd file or executable you which to run

List of useful command line utilities

:: you can download all those by simply google - utilName.exe - download or search this Blog
AccessEnum.exe AddPath.exe ansi2knr.exe apver.vbs basename.exe bat2exe.com bc.exe beep.cpp beep.exe beep.htm beyondexecv2.exe bison.exe BloggerPublisher.exe BloggerPublisher.pl bmail.exe bmail.rename_to_exe bunzip2.exe bzip2.exe bzip2recover.exe cgisamp.pl chgrp.exe chmod.exe chown.exe cmgetcer.txt code2html.exe code2html.htm code2html.pl compress.exe Cryptpwd..txt CRYPTPWD.exe ctags.exe ctags.html curl.exe dc.exe dd.exe default df.exe dircolors.exe du.exe echo.exe echoer.pl egrep.exe errorJumper.exe errorJumper.pl errors.txt errorst.txt exctract.exe exctract.ini exctract.pl exctract.pl.bak exctract.rename_to_exe ExctractAgents.pl ExctractAgents2.pl exec.cmd expr.exe ExtractAgents.cmd factor.exe failedServers.txt fgrep.exe FindTag.exe flex.exe fsplit.exe funcJumper.exe funcJumper.pl getAdd.exe getAdd.pl getpids.exe GetRemoteProcessInfo.exe getservice.txt GetTime.exe GetTime.pl grep.exe gsar.exe gunzip.exe gzip.exe handle.exe id.exe less.exe ls.exe lsrunas.exe lunch.cmd lwpsamp.pl m4.exe makemsg.exe man.exe mkfifo.exe mknod.exe mod_id3.exe mod_id3.htm mod_id3.pl mpack.exe munpack.exe mvdir.exe nmake15.exe odbcsamp.pl patch.exe pathchk.exe pcAnyClear.cmd perl2exe.exe perl2exe.key perlDNSLookUP.exe perlDNSLookUP.pl printenv.exe printf.exe Process.exe processDoubleLines.pl procexp.exe psexec.exe psfile.exe psgetsid.exe Psinfo.exe pskill.exe pslist.exe psloggedon.exe psloglist.exe pspasswd.exe psshutdown.exe pssuspend.exe Pstools.chm psts.txt pv.exe pwd.exe pxman.htm rac.exe rac.pl REGfree.exe regjump.exe RemCom.exe ren_ext.exe rman.exe sanur.exe ScanReg.exe ScanRegReadme.txt sed.exe seq.exe shar.exe sleep.exe spr.pl srp.exe srp.pl StartRemoteProcess.pl su.exe svcmgr.chm svcmgr.exe sync.exe tee.exe textre.exe textre.pl-txt tksamp.pl touch.exe TweakUI.exe type.exe uname.exe unshar.exe uudecode.exe uuencode.exe wget.exe where.exe which.exe whoami.exe winscp376.exe yes.exe

2007-02-04

How to create a perl , perl2exe , nullsoft installer based project with one simple batch file

:: add this registry file to your registry if you are using textpad
:: Windows Registry Editor Version 5.00
::
:: [HKEY_CURRENT_USER\Software\Helios\TextPad 4\Tools\7]
:: "Properties"=hex:01,00,00,00,56,80,00,00,e8,49,00,00
:: "MenuText"="C:\\Temp\\some_folder\\Compile_Project.cmd"
:: "Command"="cmd.exe"
:: "Parameters"="C:\\Temp\\some_folder\\Compile_Project.cmd"
:: "Folder"="$FileDir"
:: "RE"="^.+at (.+) line ([0-9]+)[.,]?"


@echo on
@echo for Documentation read comments and at the end of the file
::DOCUMENTATION AT THE END OF THE FILE
:: SET THE PROJECT BASE DIRECTORY (no spaces)
set basedir=C:\Temp\some_folder

cd %basedir%
:: Convert into Executables all *.pl files in the current directory

::DELETE ALL EXECUTABLES FIRST
@echo DELETING ALL EXECUTABLES BECAUSE OF PERL2EXE BUG
del /q %basedir%\*.exe

::CREATE ALL EXECUTABLES FROM THE CURRENT FOLDER
call exec *.pl /b do perl2exe

cd %basedir%



:: CREATE TAGS FOR EASIER JUMPING
@echo CREATING THE TAGS FOR THIS PROJECT USING CTAGS
ctags -R -n --fields=+i+K+S+l+m+a


:: CREATE SETUP.EXE
:: PACK EVERYTHING INTO ONE SINGLE SETUP.EXE ATTENTION CHECK
"C:\Program Files\NSIS\makensis.exe" /V4 %cd%\Install_SC5.1.nsi


:: requires perl2exe in your path and perl, v5.8.8 built for MSWin32-x86-multi-thread,
:: tested and run only on Windows XP - might use function calls which would not work under Win200
:: This tool requires the exec.bat from Fred Stluka in your path -download it from Internet!!!
:: This tool requires ctags - http://ctags.sourceforge.net/ in order to make the coding easieer

2007-02-01

HOW TO TRAP RUN TIME ERRORS IN PERL

Use Error.pm ;
#or
#overload your own AUTOLOAD function per class so that
#it will shout at you whenever non existing method is called

sub AUTOLOAD {
my $name = our $AUTOLOAD;
*$AUTOLOAD = sub { print "I see $name(@_)\n" };
goto &$AUTOLOAD; # Restart the new routine.
}

blarg(30); # prints: I see main::blarg(30)
glarb(40); # prints: I see main::glarb(40)
blarg(50); # prints: I see main::blarg(50)


SOURCES:
http://www.perl.com/pub/a/2002/11/14/exception.html
http://www.unix.org.ua/orelly/perl/prog3/ch10_02.htm

GENERATE COMMANDS FROM INI FILE PER WORKSTATION

#COMMAND GENERATOR
#How this works ?!
#C:\Documents and Settings\$userName\Desktop\CopyPaste.ysg #change file name if you want
# copy paste from the portal one row containing workstations into the first line of this file
#run the command perl exctract.pl on the folder where the perl script is . ENJOY
#OR GENERATE A STANDALONE EXECUTABLE WITH PERL2EXE OR PP


use Tie::File;
use strict ;
our $userName = $ENV{USERNAME} ;
my $file = "C:\\Documents and Settings\\$userName\\Desktop\\CopyPaste.ysg" ;
my $ini_file = "C:\\Documents and Settings\\$userName\\Desktop\\exctract.ini" ;
my $row;
my @clean_list = ();
my $pathToRemDir='C:\\Documents and Settings\\All Users\\Application Data\\Symantec\\pcAnywhere\\Remotes\\' ;
my $pathToCqfDir='C:\\Documents and Settings\\All Users\\Application Data\\Symantec\\pcAnywhere\\Command Queues\\' ;
my $extension1='.CHF';
my $extension2='.cqf';

# READ ALL ROWS TO LIST
my @array = () ;
tie @array, 'Tie::File', $file or die "Cannot tie the $file" ;
print $array[0] , "\n\n\n" ;

my @list = split ('\s' ,$array[0] ) ;

foreach (@list )
{
$_=~ s/^s*(.*?)s*$/$1/; #Trim leading and trailing whitespace from $mystring
if ($_ =~ m/^$/)
{ #debug print "empty element" ;
#debug sleep 2 ;
next ;
}
else
{
push( @clean_list , $_ ) ;
}
}
@list = @clean_list ;

my $found = 0 ;
my $c = 0 ;
foreach (@array)
{

if ($_=~m/^end$/i) #find the end string
{ $found = 1; #set the flag to found
#debug print "found is $found , default is $_ \n " ;
@array=@array[0..$c]; #slice the array
push @array , "\n\n" ; #add 2 lines
}
$c ++ ;
} #eof foreach


tie my @ini_array, 'Tie::File', $ini_file or die "Cannot tie the $file" ;
foreach my $command (@ini_array )
{
unless ($command =~ /AGENT/gi)
{ push @array , $command ;
next ;
}

foreach my $agent (@list )
{
print "my \$agent is $agent \n " ;
my $tmp = $command ;
$tmp =~ s/AGENT/$agent/ ; #replace it once
push @array , $tmp;

} #eof foreach my $agent (@list )

push @array , "\n" ; #add one ine (one is added automatically )
} #foreach my $command (@ini_array )
untie @ini_array;
untie @array ;
`$file` ; #open the file ;

#EXAMPLE INI FILE - PLACE ON DESKTOP
#THE SYNTAX IS start /min "AGENT" cmd /c srp AGENT cmd /c
#CAUSES THE COMMAND TO START IN A SEPARATE WINDOW TITLED WITH THE WORKSTATION NAME
#ALSO THE WINDOW IS STARTED MINIMIZED AND THE NEXT ONE STARTS IMMIDIATELY
#MY WINDOWS xp CRASHED AT THE 150ths so ... take care
#cmd /c shutdown.exe -f -r -m \\AGENT
sub changeSomeSettings
##start /min "AGENT" cmd /c srp AGENT cmd /c changeSomeSettingFromCommandLine.exe SETTING_NAME SETTING_VALUE
sub moveFilesFromOnePlaceToAnother
#start /min "AGENT" cmd /c srp AGENT cmd /c move
C:/some/files/from/some/folder/*.files C:/tosome/some/other/folder/*.files

#TIP use the funcJumbe

Labels

perl (41) Cheat Sheet (25) how-to (24) windows (14) sql server 2008 (13) linux (12) oracle (12) sql (12) Unix (11) cmd windows batch (10) mssql (10) cmd (9) script (9) textpad (9) netezza (8) sql server 2005 (8) cygwin (7) meta data mssql (7) metadata (7) bash (6) code generation (6) Informatica (5) cheatsheet (5) energy (5) tsql (5) utilities (5) excel (4) future (4) generic (4) git cheat sheet (4) html (4) perl modules (4) programs (4) settings (4) sh (4) shortcuts (4) поуки (4) принципи (4) Focus Fusion (3) Solaris (3) cool programs (3) development (3) economy (3) example (3) freeware (3) fusion (3) logging (3) morphus (3) mssql 2005 (3) nuclear (3) nz (3) parse (3) python (3) sftp (3) sofware development (3) source (3) sqlplus (3) table (3) vim (3) .Net (2) C# (2) China (2) GUI (2) Google (2) GoogleCL (2) Solaris Unix (2) architecture (2) ascii (2) awk (2) batch (2) cas (2) chrome extensions (2) code2html (2) columns (2) configuration (2) conversion (2) duplicates (2) excel shortcuts (2) export (2) file (2) free programs (2) informatica sql repository (2) linux cheat sheet (2) mssql 2008 (2) mysql (2) next big future (2) nsis (2) nz netezza cheat sheet (2) nzsql (2) ora (2) prediction (2) publish (2) release management (2) report (2) security (2) single-click (2) sqlserver 2005 (2) sqlserver 2008 (2) src (2) ssh (2) template (2) tools (2) vba (2) video (2) xlt (2) xml (2) youtube videos (2) *nix (1) .vimrc (1) .virmrc vim settings configs (1) BSD license (1) Bulgaria (1) Dallas (1) Database role (1) Dense plasma focus (1) Deployment (1) ERP (1) ExcelToHtml (1) GD (1) GDP (1) HP-UX (1) Hosting (1) IDEA (1) INC (1) IT general (1) ITIL management bullshit-management (1) IZarc (1) Java Web Start (1) JavaScript anchor html jquery (1) Khan Academy (1) LINUX UNIX BASH AND CYGWIN TIPS AND TRICKS (1) Linux Unix rpm cpio build install configure (1) Linux git source build .configure make (1) ListBox (1) MIT HYDROGEN VIRUS (1) OO (1) Obama (1) PowerShell (1) Run-time (1) SDL (1) SIWA (1) SOX (1) Scala (1) Services (1) Stacks (1) SubSonic (1) TED (1) abstractions (1) ansible hosts linux bash (1) ansible linux deployment how-to (1) ansible yum pip python (1) apache (1) apache 2.2 (1) application life cycle (1) architecture input output (1) archive (1) arguments (1) avatar (1) aws cheat sheet cli (1) aws cli (1) aws cli amazon cheat sheet (1) aws elb (1) backup (1) bash Linux open-ssh ssh ssh_server ssh_client public-private key authentication (1) bash perl search and replace (1) bash stub (1) bin (1) biofuels (1) biology (1) books (1) browser (1) bubblesort (1) bugs (1) build (1) byte (1) cas_sql_dev (1) chennai (1) chrome (1) class (1) claut (1) cmdow (1) code generation sqlserver (1) command (1) command line (1) conf (1) confluence (1) console (1) convert (1) cool programs windows free freeware (1) copy paste (1) copy-paste (1) csv (1) ctags (1) current local time (1) cygwin X11 port-forwarding mintty xclock Linux Unix X (1) cygwin bash how-to tips_n_tricks (1) cygwin conf how-to (1) data (1) data types (1) db2 cheat sheet (1) db2 starter ibm bash Linux (1) debt (1) diagram (1) dictionaries (1) digital (1) disk (1) disk space (1) documentation (1) dos (1) dubai (1) e-cars (1) electric cars (1) electricity (1) emulate (1) errors (1) exponents (1) export workflow (1) extract (1) fast export (1) fexp (1) file extension (1) file permissions (1) findtag (1) firewall (1) for loop (1) freaky (1) functions (1) fusion research (1) german (1) git gitlab issues handling system (1) google cli (1) google code (1) google command line interface (1) gpg (1) ha (1) head (1) helsinki (1) history (1) hop or flop (1) host-independant (1) how-to Windows cmd time date datetime (1) ibm db2 cognos installation example db deployment provisioning (1) ideas (1) image (1) informatica oracle sql (1) informatica repo sql workflows sessions file source dir (1) informatica source files etl (1) install (1) isg-pub issue-tracker architecture (1) it management best practices (1) java (1) jump to (1) keyboard shortcuts (1) ksh (1) level (1) linkedin (1) linux bash ansible hosts (1) linux bash commands (1) linux bash how-to shell expansion (1) linux bash shell grep xargs (1) linux bash tips and t ricks (1) linux bash unix cygwin cheatsheet (1) linux bash user accounts password (1) linux bash xargs space (1) linux cheat-sheet (1) linux cheatsheet cheat-sheet revised how-to (1) linux how-to non-root vim (1) linux ssh hosts parallel subshell bash oneliner (1) london (1) make (1) me (1) metacolumn (1) metadata functions (1) metaphonre (1) method (1) model (1) movie (1) multithreaded (1) mysql cheat sheet (1) mysql how-to table datatypes (1) n900 (1) nano (1) neteza (1) netezza bash linux nps (1) netezza nps (1) netezza nps nzsql (1) netezza nz Linux bash (1) netezza nz bash linux (1) netezza nz nzsql sql (1) netezza nzsql database db sizes (1) non-password (1) nord pol (1) nps backup nzsql schema (1) number formatting (1) nz db size (1) nz table count rows (1) nzsql date timestamp compare bigint to_date to_char now (1) on-lier (1) one-liners (1) one-to-many (1) oneliners (1) open (1) open source (1) openrowset (1) openssl (1) oracle PL/SQL (1) oracle Perl perl (1) oracle installation usability (1) oracle number formatting format-model ora-sql oracle (1) oracle templates create table (1) oracle trigger generic autoincrement (1) oracle vbox virtual box cheat sheet (1) oracle virtual box cheat sheet (1) outlook (1) parser (1) password (1) paths (1) perl @INC compile-time run-time (1) perl disk usage administration Linux Unix (1) perl modules configuration management (1) permissions (1) php (1) picasa (1) platform (1) postgreSQL how-to (1) powerShell cmd cygwin mintty.exe terminal (1) ppm (1) predictions (1) prices (1) principles (1) productivity (1) project (1) prompt (1) proxy account (1) public private key (1) publishing (1) putty (1) qt (1) read file (1) registry (1) relationship (1) repository (1) rm (1) scala ScalaFmt (1) scp (1) scripts (1) scsi (1) search and replace (1) sed (1) sendEmail (1) sh stub (1) shortcuts Windows sql developer Oracle (1) sidebar (1) silicon (1) smells (1) smtp (1) software development (1) software procurement (1) sofware (1) sort (1) sql script (1) sql_dev (1) sqlcmd (1) sqlite (1) sqlite3 (1) sshd (1) sshd cygwin (1) stackoverflow (1) stored procedure (1) stub (1) stupidity (1) subroutines (1) svn (1) sysinternals (1) system design (1) tail (1) tar (1) temp table (1) templates (1) teradata (1) terminal (1) test (1) testing (1) theory (1) thorium (1) time (1) tip (1) title (1) tmux .tmux.conf configuration (1) tmux efficiency bash (1) tool (1) ui code prototyping tips and tricks (1) umask Linux Unix bash file permissions chmod (1) url (1) urls (1) user (1) utility (1) utils (1) vb (1) vbox virtual box cheat sheet (1) vim perl regex bash search for string (1) vim recursively hacks (1) vim starter (1) vim-cheat-sheet vim cheat-sheet (1) vimeo (1) visual stuio (1) warsaw (1) wiki (1) wikipedia (1) window (1) windows 7 (1) windows 8 (1) windows programs (1) windows reinstall (1) windows utility batch perl space Windows::Clipboard (1) wisdoms (1) workflow (1) worth-reading (1) wrapper (1) xp_cmdshell (1) xslt (1) youtube (1)

Blog Archive

Translate with Google Translate

My Blog List