topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Friday April 26, 2024, 2:29 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - skrommel [ switch to compact view ]

Pages: prev1 ... 3 4 5 6 7 [8] 9 10 11 12 13 ... 38next
176
Coding Snacks / Re: Idea: Lightbox
« on: July 16, 2008, 07:03 PM »
 :) Try White!

White - Fill the screen with white color to use it as a lightbox.

Features:
- Press Esc to exit.
- Dobubleclick the tray icon to show.



You'll find the downloads and more info at 1 Hour Software by Skrommel.

Skrommel

177
 :) Try DragLock!

DragLock - Press the windows key to lock the mouse movement along one axis.

Features:
- Locks to the axis you start to move along.
- Rightclick the tray menu to change hotkey.

You'll find the downloads and more info at 1 Hour Software by Skrommel.

Skrommel

178
Post New Requests Here / Re: IDEA: Draw on your desktop
« on: July 08, 2008, 08:14 PM »
 :) Just updated DesktopDrawer above. Works much better now.

Skrommel

179
Post New Requests Here / Re: IDEA: Draw on your desktop
« on: July 05, 2008, 07:35 PM »
 :-[ I'll get right on it, mouser!

Skrommel

180
Post New Requests Here / Re: IDEA: Draw on your desktop
« on: July 05, 2008, 07:21 PM »
 :) Here's DesktopDrawer - Draw on your desktop!

Just run the script, paint using your mouse, press Esc to exit, or use the toolbar.

I was unable to post the whole code because of size limitations on the forum, so you have to download two files:
The script requires Gdip.ahk from http://www.autohotke...orum/topic32238.html
and COM.ahk from http://www.autohotke...orum/topic22923.html

Just place the ahk-files in the same folder as the script.

It's an early release! I'm having trouble with GDI+, Vista won't always update the desktop, and it's lacking in functionality, but give it a try.

Skrommel

;DesktopDrawer.ahk
; Paint on your desktop
; Just run the script, paint using your mouse, press Esc to quit
; Requires Gdip.ahk from http://www.autohotkey.com/forum/topic32238.html
;       and COM.ahk from http://www.autohotkey.com/forum/topic22923.html
;Skrommel @ 2008

#SingleInstance, Force
#NoEnv
SetBatchLines,-1
SetWorkingDir %A_ScriptDir%
SetWinDelay,0

applicationname=DesktopDrawer


START:
IniRead,penwidth,%applicationname%.ini,Settings,penwidth
IniRead,pencolor,%applicationname%.ini,Settings,pencolor
If penwidth=ERROR
  penwidth=4
If pencolor=ERROR
  pencolor=FF0000

wallpaperfile=wallpaper.bmp
drawingfile=drawing.png

If !pToken := Gdip_Startup()
{
  MsgBox, 48, gdiplus error!, Gdiplus failed to start. Please ensure you have gdiplus on your system
  ExitApp
}


;GUI
Gui,1:Destroy
Gui,1:-Caption +E0x80000 +LastFound -AlwaysOnTop -ToolWindow +OwnDialogs
Gui,1:Show, NA
hwnd1:= WinExist()
width1:=A_ScreenWidth
height1:=A_ScreenHeight
hbm1 := CreateDIBSection(width1,height1)
hdc1 := CreateCompatibleDC()
obm1 := SelectObject(hdc1, hbm1)
pGraphic1 := Gdip_GraphicsFromHDC(hdc1)


;LOADWALLPAPER
RegRead,tile,HKEY_CURRENT_USER,Control Panel\Desktop,TileWallpaper
RegRead,style,HKEY_CURRENT_USER,Control Panel\Desktop,WallpaperStyle
RegRead,wallpaper,HKEY_CURRENT_USER,Control Panel\Desktop,WallPaper
RegRead,background,HKEY_CURRENT_USER,Control Panel\Colors,Background
If wallpaper=%A_Scriptdir%\%wallpaperfile%
{
  IniRead,tile,%applicationname%.ini,Settings,tile
  IniRead,style,%applicationname%.ini,Settings,style
  IniRead,wallpaper,%applicationname%.ini,Settings,wallpaper
}
Else
{
  background:=DECR_G_BTOHEXRGB(background)
  IniWrite,%tile%,%applicationname%.ini,Settings,tile
  IniWrite,%style%,%applicationname%.ini,Settings,style
  IniWrite,%wallpaper%,%applicationname%.ini,Settings,wallpaper
}

width3 := A_ScreenWidth
height3 := A_ScreenHeight
pBitmap3 := Gdip_CreateBitmap(width3,height3)
pGraphic3 := Gdip_GraphicsFromImage(pBitmap3)
pBitmapFile3 := Gdip_CreateBitmapFromFile(wallpaper)
fileWidth3 := Gdip_GetImageWidth(pBitmapFile3)
fileHeight3 := Gdip_GetImageHeight(pBitmapFile3)
Gdip_SetSmoothingMode(pGraphic3, 4)
Gdip_SetInterpolationMode(pGraphic3, 7)

hBrush:= Gdip_BrushCreateSolid("0xFF" background)
Gdip_FillRectangle(pGraphic3, hBrush, 0, 0, width3, height3)
Gdip_DeleteBrush(hBrush)

If tile=1  ;tile
{
  x:=-1*filewidth3
  y:=0
  Loop
  {
    x+=filewidth3
    If (x>=A_ScreenWidth)
    {
      x:=0
      y+=fileheight3
      If (y>=A_ScreenHeight)
        Break
    }
    Gdip_DrawImage(pGraphic3, pBitmapFile3, x, y, filewidth3, fileheight3, 0, 0, filewidth3, fileheight3)
  }
}
Else
If style=2  ;stretch
  Gdip_DrawImage(pGraphic3, pBitmapFile3, 0, 0, width3, height3, 0, 0, filewidth3, fileheight3)
Else  ;center
  Gdip_DrawImage(pGraphic3, pBitmapFile3, width3/2-filewidth3/2, height3/2-fileheight3/2, filewidth3, fileheight3, 0, 0, filewidth3, fileheight3)

Gdip_DisposeImage(pBitmapFile3)

Gdip_DrawImage(pGraphic1, pBitmap3, 0, 0, width3, height3, 0, 0, width3, height3)


;LOADDRAWING
width2 := A_ScreenWidth
height2 := A_ScreenHeight
pBitmap2 := Gdip_CreateBitmap(width2,height2)
pGraphic2 := Gdip_GraphicsFromImage(pBitmap2)
pBitmapFile2 := Gdip_CreateBitmapFromFile(drawingfile)
fileWidth2 := Gdip_GetImageWidth(pBitmapFile2)
fileHeight2 := Gdip_GetImageHeight(pBitmapFile2)
Gdip_SetSmoothingMode(pGraphic2, 4)
Gdip_SetInterpolationMode(pGraphic2, 7)
Gdip_DrawImage(pGraphic2, pBitmapFile2, 0, 0, fileWidth2, fileheight2, 0, 0, fileWidth2, fileHeight2)
Gdip_DisposeImage(pBitmapFile2)

Gdip_DrawImage(pGraphic1, pBitmap2, 0, 0, width2, height2, 0, 0, width2, height2)

hBrush:=Gdip_BrushCreateSolid("0xFF" pencolor)
hPen := Gdip_CreatePen("0xFF" pencolor, penwidth)
DllCall("gdiplus\GdipSetPenLineCap197819",UInt,hpen,UInt,2,UInt,2,UInt,0)

Loop,10
  UpdateLayeredWindow(hwnd1, hdc1, 0, 0, width1, height1, 25*A_Index+5)

;TOOLBAR
Gui,4:Destroy
Gui,4:Margin,0,0
Gui,4:+LastFound +AlwaysOnTop +ToolWindow +OwnDialogs
Gui,4:Font,C000000 S20,Wingdings 
Loop,5
  Gui,4:Add,Text,% "x+0 yp GPEN Vwidth_" A_Index*2,% Chr(0x8B+A_Index*2)
Gui,4:Add,Picture,xm w0 h0
colors=000000|FFFFFF|FF0000|00FF00|0000FF
Loop,Parse,colors,|
{
  Gui,4:Font,C%A_LoopField% S24,Wingdings 
  Gui,4:Add,Text,x+0 GPEN Vcolor_%A_LoopField%,% Chr(0x6C)
}
Gui,4:Font, 
Gui,4:Add,Edit,xm,
Gui,4:Add,Button,xm w40 Default GSAVE,&Save
Gui,4:Add,Button,x+0 w40 GEXIT,&Quit
Gui,4:Add,Button,x+0 w40 GCLEAR,&Clear
Gui,4:Show,x0 y0 NA
hwnd4:= WinExist()

OnMessage(0x201, "WM_LBUTTONDOWN")
OnExit,Exit
Return


PEN:
StringSplit,part_,A_GuiControl,_
If part_1=color
  pencolor:=part_2
If part_1=width
  penwidth:=part_2
Gdip_DeleteBrush(hBrush)
Gdip_DeletePen(hPen)
hBrush:=Gdip_BrushCreateSolid("0xFF" pencolor)
hPen := Gdip_CreatePen("0xFF" pencolor, penwidth)
DllCall("gdiplus\GdipSetPenLineCap197819",UInt,hpen,UInt,2,UInt,2,UInt,0)
IniWrite,%pencolor%,%applicationname%.ini,Settings,pencolor
IniWrite,%penwidth%,%applicationname%.ini,Settings,penwidth
Return


UPDATE(pBitmap,width,height,x=0,y=0)
{
  Local empty

  Gdip_DrawImage(pGraphic1, pBitmap, x, y, width, height, x, y, width, height)
  UpdateLayeredWindow(hwnd1, hdc1, 0, 0, width1, height1)
}


SAVETOFILE:
Gdip_SaveBitmapToFile(pBitmap2, drawingfile)

Gdip_DrawImage(pGraphic3, pBitmap2, 0, 0, width3, height3, 0, 0, width3, height3)
UpdateLayeredWindow(hwnd3, hdc3, 0, 0, width3, height3)
Gdip_SaveBitmapToFile(pBitmap3, wallpaperfile)

RegWrite,REG_SZ,HKEY_CURRENT_USER,Control Panel\Desktop,TileWallpaper,0
RegWrite,REG_SZ,HKEY_CURRENT_USER,Control Panel\Desktop,WallpaperStyle,2
RegWrite,REG_SZ,HKEY_CURRENT_USER,Control Panel\Desktop,WallPaper,%A_Scriptdir%\%wallpaperfile%
Gosub,CHANGEWALLPAPER
Return


CLEANUP:
Gui,4:Destroy
Loop,10
  UpdateLayeredWindow(hwnd1, hdc1, 0, 0, width1, height1, 255-A_Index*25-5)

SelectObject(hdc1, obm1)
DeleteObject(hbm1)
DeleteDC(hdc1)
Gdip_DeleteGraphics(pGraphic1)

Gdip_DeletePen(hPen)
Gdip_DeletePen(hBrush)

Gdip_DeleteGraphics(pGraphic2)
Gdip_DisposeImage(pBitmap2)

Gdip_DeleteGraphics(pGraphic3)
Gdip_DisposeImage(pBitmap3)

Gdip_Shutdown(pToken)
Return


CLEAR:
FileDelete,%A_ScriptDir%\%wallpaperfile%
FileDelete,%A_ScriptDir%\%drawingfile%
Gosub,CLEANUP
Goto,START


GuiEscape:
GuiClose:
SAVE:
Gosub,SAVETOFILE

EXIT:
Gosub,CLEANUP
ExitApp


WM_LBUTTONDOWN(wParam, lParam)
{
  Local empty

  mx:=lParam & 0xFFFF
  my:=lParam >> 16

  Gdip_FillEllipse(pGraphic1, hBrush, mx-penwidth/2, my-penwidth/2, penwidth, penwidth)
  UpdateLayeredWindow(hwnd1, hdc1, 0, 0, width1, height1)

  Gdip_FillEllipse(pGraphic2, hBrush, mx-penwidth/2, my-penwidth/2, penwidth, penwidth)

  OnMessage(0x200, "WM_MOUSEMOVE")
  OnMessage(0x202, "WM_LBUTTONUP")
}


WM_LBUTTONUP(wParam, lParam)
{
  OnMessage(0x200, "") ;"WM_MOUSEMOVE"
  OnMessage(0x202, "") ;"WM_LBUTTONUP"
}


WM_MOUSEMOVE(wParam, lParam)
{
  Local empty

  oldlbutton:=lbutton
  GetKeyState,lbutton,LButton,P
  If (lbutton="U")
    Return

  oldmx:=mx
  oldmy:=my
  mx:=lParam & 0xFFFF
  my:=lParam >> 16

  Gdip_DrawLine(pGraphic1, hPen, oldmx, oldmy, mx, my)
  UpdateLayeredWindow(hwnd1, hdc1, 0, 0, width1, height1)

  Gdip_DrawLine(pGraphic2, hPen, oldmx, oldmy, mx, my)
}


RGBTOBGR(rgb)
{
  StringMid, prefix, rgb, 1, 2
  offset=0
  If (prefix="0x")
    offset=2
  Else
    prefix=
  StringMid, r, rgb,% 1+offset, 2
  StringMid, g, rgb,% 3+offset, 2
  StringMid, b, rgb,% 5+offset, 2
  Return, prefix . b . g . r
}


DECR_G_BTOHEXRGB(rgb)
{
  StringSplit,color_,rgb,%A_Space%   ;Transform dec "R G B" to hex "RGB"
  rgb=
  Loop,% color_0
  {
    tempcolor:=color_%A_Index%
    SetFormat,Integer,Hex
    EnvAdd,tempcolor,0x100
    SetFormat,Integer,Dec
    StringRight,tempcolor,tempcolor,2
    rgb=%rgb%%tempcolor%
  }
  Return,rgb
}


CHANGEWALLPAPER:
;Stolen from Sean at http://www.autohotkey.com/forum/topic16905.html
sFile = %A_Scriptdir%\%wallpaperfile%
sOpt  := "STRETCH"

WPSTYLE_CENTER  := 0
WPSTYLE_TILE    := 1
WPSTYLE_STRETCH := 2
WPSTYLE_MAX     := 3

COM_Init()
pad := COM_CreateObject("{75048700-EF1F-11D0-9888-006097DEACF9}", "{F490EB00-1240-11D1-9888-006097DEACF9}")

DllCall(NumGet(NumGet(1*pad)+28), "Uint", pad, "int64P", WPSTYLE_%sOpt%<<32|8, "Uint", 0) ; SetWallpaperOptions
/*
DllCall(NumGet(NumGet(1*pad)+24), "Uint", pad, "int64P", nOpt:=8, "Uint", 0); GetWallpaperOptions
RegExMatch("CENTER TILE STRETCH MAX", "(?:\w+\s+){" . nOpt>>32 . "}(?<OPTION>\w+\b)", WPSTYLE_)
MsgBox,   % WPSTYLE_OPTION
*/
DllCall(NumGet(NumGet(1*pad)+20), "Uint", pad, "Uint", COM_Unicode4Ansi(wFile,sFile), "Uint", 0) ; SetWallpaper
DllCall(NumGet(NumGet(1*pad)+12), "Uint", pad, "Uint", 7) ; ApplyChanges

COM_Release(pad)
COM_Term()
Return


#Include Gdip.ahk
;Download from tic at http://www.autohotkey.com/forum/topic32238.html

#Include COM.ahk
;Download from Sean at http://www.autohotkey.com/forum/topic22923.html

181
Post New Requests Here / Re: Hide menu in Start Menu
« on: June 27, 2008, 04:36 PM »
 :) Updated the code aboove with Delete, Refresh and Restart Explorer buttons,
and you can doubleclick to open a folder in Explorer.
Also added Hide and Show buttons so you change multiple selected lines at once.

Skrommel

182
Post New Requests Here / Re: IDEA: ShiftOff modification
« on: June 22, 2008, 05:18 AM »
 :) Here's ShiftOff v1.2!

ShiftOff - Turns off CapsLock when Shift is pressed together with A-Z or other user defined keys.

Also makes CapsLock work like Shift when pressed togheter with A-Z or other user defined keys.

Skrommel

183
Post New Requests Here / Re: IDEA: ShiftOff modification
« on: June 21, 2008, 05:48 PM »
 :) Something like this?

Skrommel


;ShiftCap.ahk
; Make CapsLock work like Shift
;Skrommel @ 2008

capslock::lshift

184
Post New Requests Here / Re: Insert future or past date as text
« on: June 20, 2008, 04:26 PM »
 :) And I've made the Enter key push the "Paste to" button.

Skrommel

185
Post New Requests Here / Re: Hide menu in Start Menu
« on: June 19, 2008, 03:02 PM »
 :) The code above lets you sort by hidden state, too.

Skrommel

186
 :) I've corrected a bunch of errors in the code above!

About redistribution, as long as it's for free, no problem.
The ini file is autogenerated when TimeStamp can't find one, so either edit the code to your liking, or include the ini file.

Skrommel

187
Post New Requests Here / Re: Hide menu in Start Menu
« on: June 18, 2008, 01:32 PM »
 :) Too busy programming to read the manual...

I've added another column and double click action to the script above.

Skrommel

188
Post New Requests Here / Re: Insert future or past date as text
« on: June 18, 2008, 11:43 AM »
 :) I've added a "Copy" and "Send to" button to the code above.

Skrommel

189
 :tellme: I had problems hitting the X button in Vista, so I added a few more window parts to react to. Try the version above.

Skrommel

190
 :-[ I've of course not read the whole request...again. Sorry, greasypigstudios.

 :) Great app, vradmilovic!

Skrommel

191
 :) Updated the code above!

Skrommel

192
 :) Have a look here: https://www.donation...ex.php?topic=13669.0

Skrommel

193
 :) Here's DockOc!

Dock as many windows as you like to the screen's edges!
Usage: Grab a window by the caption and drop it on a screen edge to dock it.

There's still some options I want to add, but give it a try.

Skrommel


;DockOc.ahk
; Dock as many windows as you like to the screen's edges
; Usage: Grab a window by the caption and drop it on a screen edge
;Skrommel @ 2008

#NoEnv
#SingleInstance,Force
DetectHiddenWindows,On
SetWinDelay,0
CoordMode,Mouse,Screen

applicationname=DockOc

Gosub,MENU
showing=0
SetTimer,CHECK,500
OnExit,EXIT
Return


~LButton Up::
MouseGetPos,mx,my,mwin,mctrl
If (mx=monitorLeft)
  edge=left
Else
If (mx=monitorRight-1)
  edge=right
Else
If (my=monitorTop)
  edge=top
Else
If (my=monitorBottom-1)
  edge=bottom
Else
  Return
MouseGetPos,mx,my,mwin
SendMessage,0x84,,(my<<16)|mx,,ahk_id %mwin%
part:=ErrorLevel
If part<>2
  Return

WinGetPos,wx,wy,ww,wh,ahk_id %mwin%
If (edge="left")
  WinMove,ahk_id %mwin%,,0,
Else
If (edge="right")
  WinMove,ahk_id %mwin%,,% A_ScreenWidth-ww,
Else
If (edge="top")
  WinMove,ahk_id %mwin%,,,0
Else
If (edge="bottom")
  WinMove,ahk_id %mwin%,,,% A_ScreenHeight-wh
WinSet,AlwaysOntop,On,ahk_id %mwin%
WinHide,ahk_id %mwin%
%edge%=% "" %edge% . mwin ","
showing=0
Return


CHECK:
SysGet,monitor,MonitorWorkArea
MouseGetPos,mx,my,mwin,mctrl
edge=
If (mx=0)
  edge=left
Else
If (mx=A_ScreenWidth-1)
  edge=right
Else
If (my=0)
  edge=top
Else
If (my=A_ScreenHeight-1)
  edge=bottom

If (edge="left" Or edge="right")
  orientation=y
Else
If (edge="top" Or edge="bottom")
  orientation=x
Else
{
  If (mwin<>showingid)
  {
    WinHide,ahk_id %showingid%
    showing=0
  }
  Return
}

closestid=
shortest=9999
Loop,Parse,%edge%,`,
{
  id:=A_LoopField
  If id=
    Break
  IfWinNotExist,ahk_id %id%
    StringReplace,%edge%,%edge%,%id%`,,
  WinGetPos,wx,wy,ww,wh,ahk_id %id%
  distance:=Abs(m%orientation%-w%orientation%)
  If (distance<shortest) ; And my-wy>0 And my-wy<wh)
  {
    shortest:=distance
    closestid:=id
  }
}
If closestid=
  Return
If (showingid<>closestid)
  WinHide,ahk_id %showingid%
showingid:=closestid
WinShow,ahk_id %showingid%
showing=1
Return


EXIT:
edges=left,right,top,bottom
Loop,Parse,edges,`,
{
  edge:=A_LoopField
  Loop,Parse,%edge%,`,
  {
    id:=A_LoopField
    WinSet,AlwaysOntop,Off,ahk_id %id%
    WinShow,ahk_id %id%
  }
}
ExitApp


MENU:
Menu,Tray,DeleteAll
Menu,Tray,NoStandard
Menu,Tray,Add,%applicationname%,ABOUT
Menu,Tray,Add,
Menu,Tray,Add,&About...,ABOUT
Menu,Tray,Add,E&xit,EXIT
Menu,Tray,Tip,%applicationname%
Menu,Tray,Default,%applicationname%
Return


ABOUT:
Gui,Destroy
Gui,Margin,20,20
Gui,Add,Picture,xm Icon1,%applicationname%.exe
Gui,Font,W700
Gui,Add,Text,x+10 yp+10 Bold,%applicationname% v1.0
Gui,Font,W400
Gui,Add,Text,y+10,Dock as many windows as you like to the screen's edges
Gui,Add,Text,xp y+5,Usage: Grab a window by the caption and drop it on a screen edge

Gui,Add,Picture,xm y+20 G1HOURSOFTWARE Icon2,%applicationname%.exe
Gui,Add,Text,x+10 yp,For more tools, information and donations, please visit
Gui,Font,W700 CBlue
Gui,Add,Text,y+5 G1HOURSOFTWARE,www.1HourSoftware.com
Gui,Font,W400 CBlack

Gui,Add,Picture,xm y+20 GDONATIONCODER Icon7,%applicationname%.exe
Gui,Add,Text,x+10 yp,Please support the contributors at
Gui,Font,W700 CBlue
Gui,Add,Text,y+5 GDONATIONCODER,www.DonationCoder.com
Gui,Font,W400 CBlack

Gui,Add,Picture,xm y+20 GAUTOHOTKEY Icon6,%applicationname%.exe
Gui,Add,Text,x+10 yp,This tool was made using the powerful
Gui,Font,W700 CBlue
Gui,Add,Text,y+5 GAUTOHOTKEY,www.AutoHotkey.com
Gui,Font,W400 CBlack

Gui,Show,,%applicationname% - About
Gui,+LastFound
guiid:=WinExist()
hCurs:=DllCall("LoadCursor","UInt",NULL,"Int",32649,"UInt") ;IDC_HAND
OnMessage(0x200,"WM_MOUSEMOVE")
Return

1HOURSOFTWARE:
Run,www.1HourSoftware.com
Return

DONATIONCODER:
Run,www.DonationCoder.com
Return

AUTOHOTKEY:
Run,www.AutoHotkey.com
Return

WM_MOUSEMOVE(wParam,lParam)
{
  Global hCurs
  Global guiid
  MouseGetPos,,,mwin,mctrl
  If mwin in %guiid%
  If mctrl in Static7,Static10,Static13
    DllCall("SetCursor","UInt",hCurs)
  Return
}

GuiEscape:
GuiClose:
  Gui,Destroy
  OnMessage(0x200,"")
  DllCall("DestroyCursor","Uint",hCurs)
Return

194
Coding Snacks / Re: IDEA: countdown screensaver manager
« on: June 14, 2008, 05:47 PM »
 :) Here's CountdownSaver to get you started!

Displays a countdown on top of the active screensaver.

Skrommel


;CountdownSaver.ahk
; Displays a countdown on top of the active screensaver
;Skrommel @ 2008

#NoEnv
#SingleInstance,Force
SetWorkingDir,%A_ScriptDir%
SetWinDelay,0

date=20081224000000  ;YYMMDDHHMMSS
font=Verdena
color=ffffff
size=20
weight=700
x=0
y=0

Gui,-Caption +ToolWindow
Gui,Margin,0,0
Gui,Font,S%size% W%weight% C%color%,%font%
time:=date
EnvSub,time,%A_Now%,Days
FormatTime,formatdate,%date%,dddd dd. MMMM yyyy
Gui,Add,Text,Center Vtext,%time% days left until`n%formatdate%
Gui,Color,123456
Gui,+LastFound
guiid:=WinExist()
WinSet,TransColor,123456 150
SetTimer,CHECKSCREENSAVER,1000
Return


CHECKSCREENSAVER:
  oldactive:=active
  VarSetCapacity(active,4,0)
  DllCall("user32.dll\SystemParametersInfo","uint",0x0072,"uint",0,"uint*",active,"uint",0) ; SPI_GETSCREENSAVERRUNNING = 0x0072 
  If active>0
  {
    time:=date
    EnvSub,time,%A_Now%,Days
    FormatTime,formatdate,%date%,dddd dd. MMMM yyyy
    GuiControl,,text,%time% days left until`n%formatdate%
    Gui,Show,X%x% Y%y% NoActivate
    WinSet,Topmost,,ahk_id %guiid%
  }
  Else
  If oldactive=1
    Gui,Hide
Return

195
Post New Requests Here / Re: Insert future or past date as text
« on: June 14, 2008, 04:49 PM »
 :) Try OneDay!

It shows the date x days from a given date.

Skrommel


;OneDay.ahk
; Shows the date x days from a given date
;Skrommel @ 2008

#NoEnv
#SingleInstance,Force
SendMode,Input

format=dddd dd. MMMM yyyy

applicationname=OneDay

activeid:=WinExist("A")
WinGetTitle,activetitle,ahk_id %activeid%

Gui,Add,Edit,xm w200 R1 -Wrap Vahead GCALC,0
Gui,Add,UpDown,Range-2147483648-2147483647
Gui,Add,Text,x+10 yp+3,days from
Gui,Add,DateTime,xm w200 Vfrom GCALC,%format%
Gui,Add,Text,x+10 yp+3,is
Gui,Add,Edit,xm w200 Vto
Gui,Add,Button,x+10 W60 GCOPY,&Copy
Gui,Add,Button,x+10 W60 GSEND Default,&Send to
Gui,Add,Statusbar,G1HOURSOFTWARE,www.1HourSoftware.com
Gui,Show,,%applicationname%
Gui,+LastFound
guiid:=WinExist()
hCurs:=DllCall("LoadCursor","UInt",NULL,"Int",32649,"UInt") ;IDC_HAND
OnMessage(0x200,"WM_MOUSEMOVE")
OnExit,EXIT
Return


CALC:
Gui,Submit,NoHide
EnvAdd,from,%ahead%,Days
FormatTime,to,%from%,%format%
GuiControl,,to,%to%
Return


COPY:
Clipboard=%to%
TOOLTIP(to)
Return


SEND:
Gui,Submit
IfWinExist,ahk_id %activeid%
{
  WinActivate,ahk_id %activeid%
  WinWaitActive,ahk_id %activeid%,,5
}
Send,%to%
Gosub,EXIT


TOOLTIP(tip)
{
  SetTimer,TOOLTIPOFF,Off
  ToolTip,%tip%
  SetTimer,TOOLTIPOFF,3000
}


TOOLTIPOFF:
SetTimer,TOOLTIPOFF,Off
ToolTip,
Return


1HOURSOFTWARE:
Run,www.1HourSoftware.com
Return


WM_MOUSEMOVE(wParam,lParam)
{
  Global hCurs
  Global guiid
  Global activetitle

  MouseGetPos,,,mwin,mctrl
  If mwin Not in %guiid%
    Return
  If mctrl In msctls_statusbar321
    DllCall("SetCursor","UInt",hCurs)
  If mctrl In Button2
    TOOLTIP(activetitle)
  Return
}


GuiEscape:
GuiClose:
EXIT:
OnMessage(0x200,"")
DllCall("DestroyCursor","Uint",hCurs)
ExitApp

196
 :) Try RightUpClose!

Rightclick an Explorer's close button to open the parent folder.

Skrommel


;RightUpClose.ahk
; Rightclick an Explorer's close button to open the parent folder
;Skrommel @ 2008

#SingleInstance,Force
#NoEnv
CoordMode,Mouse,Screen
SetWinDelay,0
SetBatchLines,-1

COM_Init()
OnExit,EXIT
Return

~RButton::
MouseGetPos,mx,my,hWnd
WinActivate,ahk_id %hWnd%
SendMessage,0x84,,(my<<16)|mx,,ahk_id %hWnd%
part:=ErrorLevel
If part Not In 20  ;Vista:12,19,20
  Return

If hWnd||(hWnd:=WinExist("ahk_class CabinetWClass"))||(hWnd:=WinExist("ahk_class ExploreWClass"))
{
  psh:=COM_CreateObject("Shell.Application")
  psw:=COM_Invoke(psh,"Windows")
  Loop,% COM_Invoke(psw,"Count")
    If COM_Invoke(pwb:=COM_Invoke(psw,"Item",A_Index-1),"hWnd")<>hWnd
      COM_Release(pwb)
    Else
      Break
  pfv    :=COM_Invoke(pwb,"Document")
  sFolder:=COM_Invoke(pfi:=COM_Invoke(psf:=COM_Invoke(pfv,"Folder"),"Self"),"Path")
  pfi:=0
}

SplitPath,sFolder,name,dir,ext,name_no_ext,drive
TOOLTIP(dir)
If name=
  Return
IfExist,%dir%
{
  WinClose,ahk_id %hWnd%
  Run,%dir%
}
Return


TOOLTIP(text)
{
  ToolTip,%text%
  SetTimer,TOOLTIPOFF,2000
  Return
}


TOOLTIPOFF:
  ToolTip,
Return


EXIT:
COM_Release(psf)
COM_Release(pfi)
COM_Release(pfv)
COM_Release(pwb)
COM_Release(psw)
COM_Release(psh)
COM_Term()
ExitApp


;COM.ahk by Sean at http://www.autohotkey.net/~Sean/Lib/COM.zip
COM_Init(bOLE = False)
{
Return bOLE ? COM_OleInitialize() : COM_CoInitialize()
}

COM_Term(bOLE = False)
{
Return bOLE ? COM_OleUninitialize() : COM_CoUninitialize()
}

COM_VTable(ppv, idx)
{
Return NumGet(NumGet(1*ppv)+4*idx)
}

COM_QueryInterface(ppv, IID = "")
{
If DllCall(NumGet(NumGet(1*ppv)+0), "Uint", ppv, "Uint", COM_GUID4String(IID,IID ? IID : IID=0 ? "{00000000-0000-0000-C000-000000000046}" : "{00020400-0000-0000-C000-000000000046}"), "UintP", ppv)=0
Return ppv
}

COM_AddRef(ppv)
{
Return DllCall(NumGet(NumGet(1*ppv)+4), "Uint", ppv)
}

COM_Release(ppv)
{
Return DllCall(NumGet(NumGet(1*ppv)+8), "Uint", ppv)
}

COM_QueryService(ppv, SID, IID = "")
{
DllCall(NumGet(NumGet(1*ppv)+4*0), "Uint", ppv, "Uint", COM_GUID4String(IID_IServiceProvider,"{6D5140C1-7436-11CE-8034-00AA006009FA}"), "UintP", psp)
DllCall(NumGet(NumGet(1*psp)+4*3), "Uint", psp, "Uint", COM_GUID4String(SID,SID), "Uint", IID ? COM_GUID4String(IID,IID) : &SID, "UintP", ppv:=0)
DllCall(NumGet(NumGet(1*psp)+4*2), "Uint", psp)
Return ppv
}

COM_FindConnectionPoint(pdp, DIID)
{
DllCall(NumGet(NumGet(1*pdp)+ 0), "Uint", pdp, "Uint", COM_GUID4String(IID_IConnectionPointContainer, "{B196B284-BAB4-101A-B69C-00AA00341D07}"), "UintP", pcc)
DllCall(NumGet(NumGet(1*pcc)+16), "Uint", pcc, "Uint", COM_GUID4String(DIID,DIID), "UintP", pcp)
DllCall(NumGet(NumGet(1*pcc)+ 8), "Uint", pcc)
Return pcp
}

COM_GetConnectionInterface(pcp)
{
VarSetCapacity(DIID, 16, 0)
DllCall(NumGet(NumGet(1*pcp)+12), "Uint", pcp, "Uint", &DIID)
Return COM_String4GUID(&DIID)
}

COM_Advise(pcp, psink)
{
DllCall(NumGet(NumGet(1*pcp)+20), "Uint", pcp, "Uint", psink, "UintP", nCookie)
Return nCookie
}

COM_Unadvise(pcp, nCookie)
{
Return DllCall(NumGet(NumGet(1*pcp)+24), "Uint", pcp, "Uint", nCookie)
}

COM_Enumerate(penum, ByRef Result)
{
VarSetCapacity(varResult,16,0)
If (0 = _hResult_:=DllCall(NumGet(NumGet(1*penum)+12), "Uint", penum, "Uint", 1, "Uint", &varResult, "UintP", 0))
Result:=(vt:=NumGet(varResult,0,"Ushort"))=8||vt<0x1000&&DllCall("oleaut32\VariantChangeTypeEx","Uint",&varResult,"Uint",&varResult,"Uint",LCID,"Ushort",1,"Ushort",8)=0 ? COM_Ansi4Unicode(bstr:=NumGet(varResult,8)) . SubStr(COM_SysFreeString(bstr),1,0) : NumGet(varResult,8)
Return _hResult_
}

COM_Invoke(pdisp, sName, arg0="vT_NoNe",arg1="vT_NoNe",arg2="vT_NoNe",arg3="vT_NoNe",arg4="vT_NoNe",arg5="vT_NoNe",arg6="vT_NoNe",arg7="vT_NoNe",arg8="vT_NoNe",arg9="vT_NoNe")
{
Global _hResult_
nParams := 10
sParams := 0123456789
Loop, Parse, sParams
If (arg%A_LoopField% == "vT_NoNe")
{
nParams := A_Index - 1
Break
}
sParams := SubStr(sParams,1,nParams)
VarSetCapacity(DispParams,16,0), VarSetCapacity(varResult,16,0), VarSetCapacity(IID_NULL,16,0), VarSetCapacity(varg,nParams*16,0)
NumPut(&varg,DispParams,0), NumPut(nParams,DispParams,8)
If (nFlags := SubStr(sName,0) <> "=" ? 3 : 12) = 12
NumPut(&varResult,DispParams,4), NumPut(1,DispParams,12), NumPut(-3,varResult), sName:=SubStr(sName,1,-1)
Loop, Parse, sParams
If arg%A_LoopField% Is Not Integer
          NumPut(8,varg,(nParams-A_Index)*16,"Ushort"), NumPut(COM_SysAllocString(arg%A_LoopField%),varg,(nParams-A_Index)*16+8)
Else NumPut(SubStr(arg%A_LoopField%,1,1)="+" ? 9 : 3,varg,(nParams-A_Index)*16,"Ushort"), NumPut(arg%A_LoopField%,varg,(nParams-A_Index)*16+8)
If (0 = _hResult_:=DllCall(NumGet(NumGet(1*pdisp)+20), "Uint", pdisp, "Uint", &IID_NULL, "UintP", COM_Unicode4Ansi(wName, sName), "Uint", 1, "Uint", LCID, "intP", dispID))
&& (0 = _hResult_:=DllCall(NumGet(NumGet(1*pdisp)+24), "Uint", pdisp, "int", dispID, "Uint", &IID_NULL, "Uint", LCID, "Ushort", nFlags, "Uint", &dispParams, "Uint", &varResult, "Uint", 0, "Uint", 0))
&& (3 = nFlags)
Result:=(vt:=NumGet(varResult,0,"Ushort"))=8||vt<0x1000&&DllCall("oleaut32\VariantChangeTypeEx","Uint",&varResult,"Uint",&varResult,"Uint",LCID,"Ushort",1,"Ushort",8)=0 ? COM_Ansi4Unicode(bstr:=NumGet(varResult,8)) . SubStr(COM_SysFreeString(bstr),1,0) : NumGet(varResult,8)
Loop, % nParams
NumGet(varg,(A_Index-1)*16,"Ushort")=8 ? COM_SysFreeString(NumGet(varg,(A_Index-1)*16+8)) : ""
Return Result
}

COM_Invoke_(pdisp, sName, type0="",arg0="",type1="",arg1="",type2="",arg2="",type3="",arg3="",type4="",arg4="",type5="",arg5="",type6="",arg6="",type7="",arg7="",type8="",arg8="",type9="",arg9="")
{
Global _hResult_
nParams := 10
sParams := 0123456789
Loop, Parse, sParams
If (type%A_LoopField% = "")
{
nParams := A_Index - 1
Break
}
sParams := SubStr(sParams,1,nParams)
VarSetCapacity(dispParams,16,0), VarSetCapacity(varResult,16,0), VarSetCapacity(IID_NULL,16,0), VarSetCapacity(varg,nParams*16,0)
NumPut(&varg,dispParams,0), NumPut(nParams,dispParams,8)
If (nFlags := SubStr(sName,0) <> "=" ? 1|2 : 4|8) & 12
NumPut(&varResult,dispParams,4), NumPut(1,dispParams,12), NumPut(-3,varResult), sName:=SubStr(sName,1,-1)
Loop, Parse, sParams
NumPut(type%A_LoopField%,varg,(nParams-A_Index)*16,"Ushort"), type%A_LoopField%&0x4000=0 ? NumPut(type%A_LoopField%=8 ? COM_SysAllocString(arg%A_LoopField%) : arg%A_LoopField%,varg,(nParams-A_Index)*16+8,type%A_LoopField%=5||type%A_LoopField%=7 ? "double" : type%A_LoopField%=4 ? "float" : "int64") : type%A_LoopField%=0x400C||type%A_LoopField%=0x400E ? NumPut(arg%A_LoopField%,varg,(nParams-A_Index)*16+8) : VarSetCapacity(_ref_%A_LoopField%,8,0) . NumPut(&_ref_%A_LoopField%,varg,(nParams-A_Index)*16+8) . NumPut(type%A_LoopField%=0x4008 ? COM_SysAllocString(arg%A_LoopField%) : arg%A_LoopField%,_ref_%A_LoopField%,0,type%A_LoopField%=0x4005||type%A_LoopField%=0x4007 ? "double" : type%A_LoopField%=0x4004 ? "float" : "int64")
If (0 = _hResult_:=DllCall(NumGet(NumGet(1*pdisp)+20), "Uint", pdisp, "Uint", &IID_NULL, "UintP", COM_Unicode4Ansi(wName, sName), "Uint", 1, "Uint", LCID, "intP", dispID))
&& (0 = _hResult_:=DllCall(NumGet(NumGet(1*pdisp)+24), "Uint", pdisp, "int", dispID, "Uint", &IID_NULL, "Uint", LCID, "Ushort", nFlags, "Uint", &dispParams, "Uint", &varResult, "Uint", 0, "Uint", 0))
&& (3 = nFlags)
Result:=(vt:=NumGet(varResult,0,"Ushort"))=8||vt<0x1000&&DllCall("oleaut32\VariantChangeTypeEx","Uint",&varResult,"Uint",&varResult,"Uint",LCID,"Ushort",1,"Ushort",8)=0 ? COM_Ansi4Unicode(bstr:=NumGet(varResult,8)) . SubStr(COM_SysFreeString(bstr),1,0) : NumGet(varResult,8)
Loop, Parse, sParams
type%A_LoopField%&0x4000=0 ? (type%A_LoopField%=8 ? COM_SysFreeString(NumGet(varg,(nParams-A_Index)*16+8)) : "") : type%A_LoopField%=0x400C||type%A_LoopField%=0x400E ? "" : type%A_LoopField%=0x4008 ? (_TEMP_VT_BYREF_%A_LoopField%:=COM_Ansi4Unicode(NumGet(_ref_%A_LoopField%))) . COM_SysFreeString(NumGet(_ref_%A_LoopField%)) : (_TEMP_VT_BYREF_%A_LoopField%:=NumGet(_ref_%A_LoopField%,0,type%A_LoopField%=0x4005||type%A_LoopField%=0x4007 ? "double" : type%A_LoopField%=0x4004 ? "float" : "int64"))
Return Result
}

COM_DispInterface(this, prm1="", prm2="", prm3="", prm4="", prm5="", prm6="", prm7="", prm8="")
{
Critical
If A_EventInfo = 6
DllCall(NumGet(NumGet(NumGet(this+8))+28),"Uint",NumGet(this+8),"Uint",prm1,"UintP",pname,"Uint",1,"UintP",0), VarSetCapacity(sfn,63), DllCall("user32\wsprintfA","str",sfn,"str","%s%S","Uint",this+40,"Uint",pname,"Cdecl"), COM_SysFreeString(pname), (pfn:=RegisterCallback(sfn,"C F")) ? (hResult:=DllCall(pfn,"Uint",prm5,"Uint",prm6,"Uint",this,"Cdecl")) . DllCall("kernel32\GlobalFree","Uint",pfn) : (hResult:=0x80020003)
Else If A_EventInfo = 5
hResult:=DllCall(NumGet(NumGet(NumGet(this+8))+40),"Uint",NumGet(this+8),"Uint",prm2,"Uint",prm3,"Uint",prm5)
Else If A_EventInfo = 4
NumPut(0,prm3+0), hResult:=0x80004001
Else If A_EventInfo = 3
NumPut(0,prm1+0), hResult:=0
Else If A_EventInfo = 2
NumPut(hResult:=NumGet(this+4)-1,this+4), hResult ? "" : COM_Unadvise(NumGet(this+16),NumGet(this+20)) . COM_Release(NumGet(this+16)) . COM_Release(NumGet(this+8)) . COM_CoTaskMemFree(this)
Else If A_EventInfo = 1
NumPut(hResult:=NumGet(this+4)+1,this+4)
Else If A_EventInfo = 0
COM_IsEqualGUID(this+24,prm1)||InStr("{00020400-0000-0000-C000-000000000046}{00000000-0000-0000-C000-000000000046}",COM_String4GUID(prm1)) ? NumPut(this,prm2+0) . NumPut(NumGet(this+4)+1,this+4) . (hResult:=0) : NumPut(0,prm2+0) . (hResult:=0x80004002)
Return hResult
}

COM_DispGetParam(pDispParams, Position = 0, vtType = 8)
{
VarSetCapacity(varResult,16,0)
DllCall("oleaut32\DispGetParam", "Uint", pDispParams, "Uint", Position, "Ushort", vtType, "Uint", &varResult, "UintP", nArgErr)
Return NumGet(varResult,0,"Ushort")=8 ? COM_Ansi4Unicode(NumGet(varResult,8)) . SubStr(COM_SysFreeString(NumGet(varResult,8)),1,0) : NumGet(varResult,8)
}

COM_CreateIDispatch()
{
Static IDispatch
If Not VarSetCapacity(IDispatch)
{
VarSetCapacity(IDispatch,28,0),   nParams=3112469
Loop,   Parse,   nParams
NumPut(RegisterCallback("COM_DispInterface","",A_LoopField,A_Index-1),IDispatch,4*(A_Index-1))
}
Return &IDispatch
}

COM_GetDefaultInterface(pdisp, LCID = 0)
{
DllCall(NumGet(NumGet(1*pdisp) +12), "Uint", pdisp , "UintP", ctinf)
If ctinf
{
DllCall(NumGet(NumGet(1*pdisp)+16), "Uint", pdisp, "Uint" , 0, "Uint", LCID, "UintP", ptinf)
DllCall(NumGet(NumGet(1*ptinf)+12), "Uint", ptinf, "UintP", pattr)
DllCall(NumGet(NumGet(1*pdisp)+ 0), "Uint", pdisp, "Uint" , pattr, "UintP", ppv)
DllCall(NumGet(NumGet(1*ptinf)+76), "Uint", ptinf, "Uint" , pattr)
DllCall(NumGet(NumGet(1*ptinf)+ 8), "Uint", ptinf)
If ppv
DllCall(NumGet(NumGet(1*pdisp)+ 8), "Uint", pdisp), pdisp := ppv
}
Return pdisp
}

COM_GetDefaultEvents(pdisp, LCID = 0)
{
DllCall(NumGet(NumGet(1*pdisp)+16), "Uint", pdisp, "Uint" , 0, "Uint", LCID, "UintP", ptinf)
DllCall(NumGet(NumGet(1*ptinf)+12), "Uint", ptinf, "UintP", pattr)
VarSetCapacity(IID,16), DllCall("RtlMoveMemory", "Uint", &IID, "Uint", pattr, "Uint", 16)
DllCall(NumGet(NumGet(1*ptinf)+76), "Uint", ptinf, "Uint" , pattr)
DllCall(NumGet(NumGet(1*ptinf)+72), "Uint", ptinf, "UintP", ptlib, "UintP", idx)
DllCall(NumGet(NumGet(1*ptinf)+ 8), "Uint", ptinf)
Loop, % DllCall(NumGet(NumGet(1*ptlib)+12), "Uint", ptlib)
{
DllCall(NumGet(NumGet(1*ptlib)+20), "Uint", ptlib, "Uint", A_Index-1, "UintP", TKind)
If TKind <> 5
Continue
DllCall(NumGet(NumGet(1*ptlib)+16), "Uint", ptlib, "Uint", A_Index-1, "UintP", ptinf)
DllCall(NumGet(NumGet(1*ptinf)+12), "Uint", ptinf, "UintP", pattr)
nCount:=NumGet(pattr+48,0,"Ushort")
DllCall(NumGet(NumGet(1*ptinf)+76), "Uint", ptinf, "Uint" , pattr)
Loop, % nCount
{
DllCall(NumGet(NumGet(1*ptinf)+36), "Uint", ptinf, "Uint", A_Index-1, "UintP", nFlags)
If !(nFlags & 1)
Continue
DllCall(NumGet(NumGet(1*ptinf)+32), "Uint", ptinf, "Uint", A_Index-1, "UintP", hRefType)
DllCall(NumGet(NumGet(1*ptinf)+56), "Uint", ptinf, "Uint", hRefType , "UintP", prinf)
DllCall(NumGet(NumGet(1*prinf)+12), "Uint", prinf, "UintP", pattr)
nFlags & 2 ? DIID:=COM_String4GUID(pattr) : bFind:=COM_IsEqualGUID(pattr,&IID)
DllCall(NumGet(NumGet(1*prinf)+76), "Uint", prinf, "Uint" , pattr)
DllCall(NumGet(NumGet(1*prinf)+ 8), "Uint", prinf)
}
DllCall(NumGet(NumGet(1*ptinf)+ 8), "Uint", ptinf)
If bFind
Break
}
DllCall(NumGet(NumGet(1*ptlib)+ 8), "Uint", ptlib)
Return bFind ? DIID : "{00000000-0000-0000-0000-000000000000}"
}

COM_GetGuidOfName(pdisp, Name, LCID = 0)
{
DllCall(NumGet(NumGet(1*pdisp)+16), "Uint", pdisp, "Uint", 0, "Uint", LCID, "UintP", ptinf)
DllCall(NumGet(NumGet(1*ptinf)+72), "Uint", ptinf, "UintP", ptlib, "UintP", idx)
DllCall(NumGet(NumGet(1*ptinf)+ 8), "Uint", ptinf), ptinf:=0
DllCall(NumGet(NumGet(1*ptlib)+44), "Uint", ptlib, "Uint", COM_Unicode4Ansi(Name,Name), "Uint", 0, "UintP", ptinf, "UintP", memID, "UshortP", 1)
DllCall(NumGet(NumGet(1*ptlib)+ 8), "Uint", ptlib)
DllCall(NumGet(NumGet(1*ptinf)+12), "Uint", ptinf, "UintP", pattr)
GUID := COM_String4GUID(pattr)
DllCall(NumGet(NumGet(1*ptinf)+76), "Uint", ptinf, "Uint" , pattr)
DllCall(NumGet(NumGet(1*ptinf)+ 8), "Uint", ptinf)
Return GUID
}

COM_GetTypeInfoOfGuid(pdisp, GUID, LCID = 0)
{
DllCall(NumGet(NumGet(1*pdisp)+16), "Uint", pdisp, "Uint", 0, "Uint", LCID, "UintP", ptinf)
DllCall(NumGet(NumGet(1*ptinf)+72), "Uint", ptinf, "UintP", ptlib, "UintP", idx)
DllCall(NumGet(NumGet(1*ptinf)+ 8), "Uint", ptinf), ptinf := 0
DllCall(NumGet(NumGet(1*ptlib)+24), "Uint", ptlib, "Uint", COM_GUID4String(GUID,GUID), "UintP", ptinf)
DllCall(NumGet(NumGet(1*ptlib)+ 8), "Uint", ptlib)
Return ptinf
}

; A Function Name including Prefix is limited to 63 bytes!
COM_ConnectObject(psource, prefix = "", DIID = "")
{
If Not DIID
0+(pconn:=COM_FindConnectionPoint(psource,"{00020400-0000-0000-C000-000000000046}")) ? (DIID:=COM_GetConnectionInterface(pconn))="{00020400-0000-0000-C000-000000000046}" ? DIID:=COM_GetDefaultEvents(psource) : "" : pconn:=COM_FindConnectionPoint(psource,DIID:=COM_GetDefaultEvents(psource))
Else pconn:=COM_FindConnectionPoint(psource,SubStr(DIID,1,1)="{" ? DIID : DIID:=COM_GetGuidOfName(psource,DIID))
If !pconn || !ptinf:=COM_GetTypeInfoOfGuid(psource,DIID)
{
MsgBox, No Event Interface Exists! Now exit the application.
ExitApp
}
psink:=COM_CoTaskMemAlloc(40+StrLen(prefix)+1), NumPut(1,NumPut(COM_CreateIDispatch(),psink+0)), NumPut(psource,NumPut(ptinf,psink+8))
DllCall("RtlMoveMemory", "Uint", psink+24, "Uint", COM_GUID4String(DIID,DIID), "Uint", 16)
DllCall("RtlMoveMemory", "Uint", psink+40, "Uint", &prefix, "Uint", StrLen(prefix)+1)
NumPut(COM_Advise(pconn,psink),NumPut(pconn,psink+16))
Return psink
}

COM_CreateObject(CLSID, IID = "", CLSCTX = 5)
{
DllCall("ole32\CoCreateInstance", "Uint", SubStr(CLSID,1,1)="{" ? COM_GUID4String(CLSID,CLSID) : COM_CLSID4ProgID(CLSID,CLSID), "Uint", 0, "Uint", CLSCTX, "Uint", COM_GUID4String(IID,IID ? IID : IID=0 ? "{00000000-0000-0000-C000-000000000046}" : "{00020400-0000-0000-C000-000000000046}"), "UintP", ppv)
Return ppv
}

COM_ActiveXObject(ProgID)
{
DllCall("ole32\CoCreateInstance", "Uint", SubStr(ProgID,1,1)="{" ? COM_GUID4String(ProgID,ProgID) : COM_CLSID4ProgID(ProgID,ProgID), "Uint", 0, "Uint", 5, "Uint", COM_GUID4String(IID_IDispatch,"{00020400-0000-0000-C000-000000000046}"), "UintP", pdisp)
Return COM_GetDefaultInterface(pdisp)
}

COM_GetObject(Moniker)
{
DllCall("ole32\CoGetObject", "Uint", COM_Unicode4Ansi(Moniker,Moniker), "Uint", 0, "Uint", COM_GUID4String(IID_IDispatch,"{00020400-0000-0000-C000-000000000046}"), "UintP", pdisp)
Return COM_GetDefaultInterface(pdisp)
}

COM_GetActiveObject(ProgID)
{
DllCall("oleaut32\GetActiveObject", "Uint", SubStr(ProgID,1,1)="{" ? COM_GUID4String(ProgID,ProgID) : COM_CLSID4ProgID(ProgID,ProgID), "Uint", 0, "UintP", punk)
DllCall(NumGet(NumGet(1*punk)+0), "Uint", punk, "Uint", COM_GUID4String(IID_IDispatch,"{00020400-0000-0000-C000-000000000046}"), "UintP", pdisp)
DllCall(NumGet(NumGet(1*punk)+8), "Uint", punk)
Return COM_GetDefaultInterface(pdisp)
}

COM_CLSID4ProgID(ByRef CLSID, ProgID)
{
VarSetCapacity(CLSID, 16)
DllCall("ole32\CLSIDFromProgID", "Uint", COM_Unicode4Ansi(ProgID,ProgID), "Uint", &CLSID)
Return &CLSID
}

COM_GUID4String(ByRef CLSID, String)
{
VarSetCapacity(CLSID, 16)
DllCall("ole32\CLSIDFromString", "Uint", COM_Unicode4Ansi(String,String,38), "Uint", &CLSID)
Return &CLSID
}

COM_ProgID4CLSID(pCLSID)
{
DllCall("ole32\ProgIDFromCLSID", "Uint", pCLSID, "UintP", pProgID)
Return COM_Ansi4Unicode(pProgID) . SubStr(COM_CoTaskMemFree(pProgID),1,0)
}

COM_String4GUID(pGUID)
{
VarSetCapacity(String, 38 * 2 + 1)
DllCall("ole32\StringFromGUID2", "Uint", pGUID, "Uint", &String, "int", 39)
Return COM_Ansi4Unicode(&String, 38)
}

COM_IsEqualGUID(pGUID1, pGUID2)
{
Return DllCall("ole32\IsEqualGUID", "Uint", pGUID1, "Uint", pGUID2)
}

COM_CoCreateGuid()
{
VarSetCapacity(GUID, 16, 0)
DllCall("ole32\CoCreateGuid", "Uint", &GUID)
Return COM_String4GUID(&GUID)
}

COM_CoTaskMemAlloc(cb)
{
Return DllCall("ole32\CoTaskMemAlloc", "Uint", cb)
}

COM_CoTaskMemFree(pv)
{
Return DllCall("ole32\CoTaskMemFree", "Uint", pv)
}

COM_CoInitialize()
{
Return DllCall("ole32\CoInitialize", "Uint", 0)
}

COM_CoUninitialize()
{
Return DllCall("ole32\CoUninitialize")
}

COM_OleInitialize()
{
Return DllCall("ole32\OleInitialize", "Uint", 0)
}

COM_OleUninitialize()
{
Return DllCall("ole32\OleUninitialize")
}

COM_SysAllocString(sString)
{
Return DllCall("oleaut32\SysAllocString", "Uint", COM_Ansi2Unicode(sString,wString))
}

COM_SysFreeString(bstr)
{
Return DllCall("oleaut32\SysFreeString", "Uint", bstr)
}

COM_SysStringLen(bstr)
{
Return DllCall("oleaut32\SysStringLen", "Uint", bstr)
}

COM_SafeArrayDestroy(psa)
{
Return DllCall("oleaut32\SafeArrayDestroy", "Uint", psa)
}

COM_VariantClear(pvarg)
{
Return DllCall("oleaut32\VariantClear", "Uint", pvarg)
}

COM_AtlAxWinInit(Version = "")
{
COM_CoInitialize()
If Not DllCall("GetModuleHandle", "str", "atl" . Version)
DllCall("LoadLibrary"    , "str", "atl" . Version)
Return DllCall("atl" . Version . "\AtlAxWinInit")
}

COM_AtlAxWinTerm(Version = "")
{
COM_CoUninitialize()
If   hModule := DllCall("GetModuleHandle", "str", "atl" . Version)
Return DllCall("FreeLibrary"    , "Uint", hModule)
}

COM_AtlAxAttachControl(pdsp, hWnd, Version = "")
{
Return DllCall("atl" . Version . "\AtlAxAttachControl", "Uint", punk:=COM_QueryInterface(pdsp,0), "Uint", hWnd, "Uint", 0), COM_Release(punk)
}

COM_AtlAxCreateControl(hWnd, Name, Version = "")
{
If DllCall("atl" . Version . "\AtlAxCreateControl", "Uint", COM_Unicode4Ansi(Name,Name), "Uint", hWnd, "Uint", 0, "Uint", 0)=0
Return COM_AtlAxGetControl(hWnd, Version)
}

COM_AtlAxGetControl(hWnd, Version = "")
{
If DllCall("atl" . Version . "\AtlAxGetControl", "Uint", hWnd, "UintP", punk)=0
pdsp:=COM_QueryInterface(punk), COM_Release(punk)
Return pdsp
}

COM_AtlAxGetHost(hWnd, Version = "")
{
If DllCall("atl" . Version . "\AtlAxGetHost", "Uint", hWnd, "UintP", punk)=0
pdsp:=COM_QueryInterface(punk), COM_Release(punk)
Return pdsp
}

COM_AtlAxCreateContainer(hWnd, l, t, w, h, Name = "", Version = "")
{
Return DllCall("CreateWindowEx", "Uint",0x200, "str", "AtlAxWin" . Version, "Uint", Name ? &Name : 0, "Uint", 0x54000000, "int", l, "int", t, "int", w, "int", h, "Uint", hWnd, "Uint", 0, "Uint", 0, "Uint", 0)
}

COM_AtlAxGetContainer(pdsp)
{
DllCall(NumGet(NumGet(1*pdsp)+ 0), "Uint", pdsp, "Uint", COM_GUID4String(IID_IOleWindow,"{00000114-0000-0000-C000-000000000046}"), "UintP", pwin)
DllCall(NumGet(NumGet(1*pwin)+12), "Uint", pwin, "UintP", hCtrl)
DllCall(NumGet(NumGet(1*pwin)+ 8), "Uint", pwin)
Return DllCall("GetParent", "Uint", hCtrl)
}

COM_Ansi4Unicode(pString, nSize = "")
{
If (nSize = "")
    nSize:=DllCall("kernel32\WideCharToMultiByte", "Uint", 0, "Uint", 0, "Uint", pString, "int", -1, "Uint", 0, "int",  0, "Uint", 0, "Uint", 0)
VarSetCapacity(sString, nSize)
DllCall("kernel32\WideCharToMultiByte", "Uint", 0, "Uint", 0, "Uint", pString, "int", -1, "str", sString, "int", nSize + 1, "Uint", 0, "Uint", 0)
Return sString
}

COM_Unicode4Ansi(ByRef wString, sString, nSize = "")
{
If (nSize = "")
    nSize:=DllCall("kernel32\MultiByteToWideChar", "Uint", 0, "Uint", 0, "Uint", &sString, "int", -1, "Uint", 0, "int", 0)
VarSetCapacity(wString, nSize * 2 + 1)
DllCall("kernel32\MultiByteToWideChar", "Uint", 0, "Uint", 0, "Uint", &sString, "int", -1, "Uint", &wString, "int", nSize + 1)
Return &wString
}

COM_Ansi2Unicode(ByRef sString, ByRef wString, nSize = "")
{
If (nSize = "")
    nSize:=DllCall("kernel32\MultiByteToWideChar", "Uint", 0, "Uint", 0, "Uint", &sString, "int", -1, "Uint", 0, "int", 0)
VarSetCapacity(wString, nSize * 2 + 1)
DllCall("kernel32\MultiByteToWideChar", "Uint", 0, "Uint", 0, "Uint", &sString, "int", -1, "Uint", &wString, "int", nSize + 1)
Return &wString
}

COM_Unicode2Ansi(ByRef wString, ByRef sString, nSize = "")
{
pString := wString + 0 > 65535 ? wString : &wString
If (nSize = "")
    nSize:=DllCall("kernel32\WideCharToMultiByte", "Uint", 0, "Uint", 0, "Uint", pString, "int", -1, "Uint", 0, "int",  0, "Uint", 0, "Uint", 0)
VarSetCapacity(sString, nSize)
DllCall("kernel32\WideCharToMultiByte", "Uint", 0, "Uint", 0, "Uint", pString, "int", -1, "str", sString, "int", nSize + 1, "Uint", 0, "Uint", 0)
Return &sString
}

COM_ScriptControl(sCode, sLang = "", bExec = False, sName = "", pdisp = 0, bGlobal = False)
{
COM_CoInitialize()
psc  := COM_CreateObject("MSScriptControl.ScriptControl")
COM_Invoke(psc, "Language=", sLang ? sLang : "VBScript")
sName ? COM_Invoke(psc, "AddObject", sName, "+" . pdisp, bGlobal) : ""
ret  := COM_Invoke(psc, bExec ? "ExecuteStatement" : "Eval", sCode)
COM_Release(psc)
COM_CoUninitialize()
Return ret
}

197
Post New Requests Here / Re: Hide menu in Start Menu
« on: June 14, 2008, 12:56 PM »
 :) Here's a listview version, HideStartmenuFolders!

Easily hide starmenu folders.
Just toggle a checkbox to change the visibility.
Edit the doubleclick action to change from opening the folder in Explorer or toggeling the hidden state.
Click Restart Explorer to rebuild the Starmenu.

Skrommel @ 2008


;HideStartmenuFolders.ahk
; Easily hide starmenu folders.
; Just toggle a checkbox to change the visibility.
; Edit the doubleclick action to change from opening the folder in Explorer or toggeling the hidden state.
; Click Restart Explorer to rebuild the Starmenu.
;Skrommel @ 2008

;Settings - changes doubleclick action
doubleclick=Explore ; Toggle

#NoEnv
#SingleInstance,Force
SetBatchLines,-1

applicationname=HideStartmenuFolders

Gui,Margin,0,0
Gui,+Resize
Gui,Add,Button,xm yp w50 GHIDE,&Hide
Gui,Add,Button,x+0 yp w50 GSHOW,&Show
Gui,Add,Button,x+10 yp W50 GDELETE,&Delete
Gui,Add,Button,x+10 yp w75 GREFRESH,&Refresh
Gui,Add,Button,x+0 yp GREBUILD,Restart &Explorer
Gui,Add,ListView,xm Vlistview GTOGGLE Checked AltSubmit,Hidden|Folder|Path|Old Attribute|New Attribute
Gui,Add,StatusBar,G1HOURSOFTWARE,% " www.1HourSoftware.com"

Gosub,REFRESH
Gui,Show,W600 H400,%applicationname%
OnExit,EXIT
changed=0
Return


TRAVERSE:
Loop,%startmenu%\*.*,1,1
{
  IfNotInString,A_LoopFileAttrib,D
    Continue
  IfInString,A_LoopFileAttrib,H
    LV_Add("Check","",A_LoopFileName,A_LoopFileLongPath,"H","H")
  Else
    LV_Add("UnCheck","",A_LoopFileName,A_LoopFileLongPath,"","")
}
Return


REFRESH:
LV_Delete()
building=1
startmenu:=A_StartMenu ;A_Programs
Gosub,TRAVERSE
startmenu:=A_StartMenuCommon ;A_ProgramsCommon
Gosub,TRAVERSE
building=0
LV_ModifyCol(1,"AutoHdr")
LV_ModifyCol(2,"AutoHdr")
LV_ModifyCol(3,"AutoHdr Sort")
LV_ModifyCol(4,0)
LV_ModifyCol(5,0)
Return


TOGGLE:
action:=ErrorLevel
If building=1
  Return

If (A_GuiEvent="ColClick" And A_EventInfo=1)
{
  LV_ModifyCol(5,"SortDesc")
  Return
}
Else
If (A_GuiEvent="I" And action="C")
{
  If (Asc(action)=Asc("C"))
    newattrib=+H
  Else
    newattrib=-H
}
Else
If (A_GuiEvent="DoubleClick")
{
  If doubleclick=Explore
  {
    LV_GetText(path,A_EventInfo,3)
    Run,Explorer.exe /e`,%path%
    Return
  }
  Else
  {
    row:=LV_GetNext(A_EventInfo-1,"C")
    If (row=A_EventInfo)
      LV_Modify(A_EventInfo,"-Check") 
    Else
      LV_Modify(A_EventInfo,"+Check") 
    Return
  }
}
Else
  Return

LV_GetText(path,A_EventInfo,3)
LV_GetText(origattrib,A_EventInfo,4)

FileSetAttrib,%newattrib%,%path%,1,0
FileGetAttrib,attrib,%path%
IfInString,attrib,H
  attrib=H
Else
  attrib=
LV_Modify(A_EventInfo,"Col5",attrib)
If (attrib<>origattrib)
  changed+=1
Else
  changed-=1
SB_SetText(" www.1HourSoftware.com       Changed folders: " changed)
Return


REBUILD:
Process,Close,Explorer.exe
Sleep,5000
Process,Exist,Explorer.exe
If ErrorLevel=0
  Run,Explorer.exe
Return


HIDE:
row=0
Loop
{
  row:=LV_GetNext(row,"")
  If row=0
    Break
  LV_Modify(row,"+Check") 
}
Return


SHOW:
row=0
Loop
{
  row:=LV_GetNext(row,"")
  If row=0
    Break
  LV_Modify(row,"-Check") 
}
Return


DELETE:
count=0
row=0
Loop
{
  row:=LV_GetNext(row,"")
  If row=0
    Break
  count+=1
}
If count=0
  Return

MsgBox,4,%applicationname%,Delete %count% folders?
IfMsgBox,No
 Return

row=0
Loop
{
  row:=LV_GetNext(row,"")
  If row=0
    Break
  LV_GetText(path,row,3)
  FileRecycle,%path%
  LV_Delete(row)
}
Return


1HOURSOFTWARE:
Run,www.1HourSoftware.com
Return


GuiSize:
If A_EventInfo<>1  ;not minimized
  GuiControl,Move,listview,% "W" A_GuiWidth " H" A_GuiHeight-45
Return


GuiClose:
GuiEscape:
Gui,Destroy
ExitApp


EXIT:
If changed<>0
  MsgBox,0,%applicationname%,You may have to log off to update the Startmenu
ExitApp

198
 :tellme: If works very well on Vista... Try the script again, I've corrected the line split, commented the script and decreased the sensitivity.

Skrommel

199
 :) Here's TimeStamp 2.1!

Use the tray menu or hotkeys to send user defined times and dates to the active window.
Doubleclick the tray icon to send the last used timestamp.
Use the Settings menu in the tray to change the timestamps and hotkeys.
Default hotkeys are F1 and F2.

Skrommel


;TimeStamp.ahk
; Use the tray menu or hotkeys to send user defined times and dates to the active window.
; Doubleclick the tray icon to send the last used timestamp.
; Use the Settings menu in the tray to change the timestamps and hotkeys.
;Skrommel @ 2008


#SingleInstance,Force
#Persistent,On
#NoEnv
SendMode,Input
SetWorkingDir,%A_ScriptDir%
SetBatchLines,-1
SetWinDelay,0
SetKeyDelay,0
AutoTrim,Off

applicationname=TimeStamp
Gosub,INIFILE
Gosub,MENU

string:=stamp1

Gui,+LastFound
guiid:=WinExist()
DllCall("RegisterShellHookWindow",UInt,guiid)
msgnum:=DllCall("RegisterWindowMessage",Str,"SHELLHOOK")
OnMessage(msgnum,"SHELLMESSAGE" )
OnMessage(0x404,"TRAYMESSAGE")
OnMessage(0x200,"WM_MOUSEMOVE")
OnExit,EXIT
Return


MENU:
Menu,Tray,NoStandard
Menu,Tray,DeleteAll
Menu,Tray,Add,%applicationname%,SEND
Menu,Tray,Default,%applicationname%

Menu,Tray,Add
stamps=0
Loop,99
{
  IniRead,stamp,%applicationname%.ini,Settings,stamp%A_Index%
  If stamp=ERROR
    Continue
  stamps+=1
  stamp%stamps%:=stamp
  string:=stamp
  Gosub,EXPAND

  IniRead,hotkey,%applicationname%.ini,Settings,hotkey%A_Index%
  If hotkey=ERROR
    hotkey=
  Else
  {
    hotkey%stamps%:=hotkey
    Hotkey,%hotkey%,SEND,On
  }
  Menu,Tray,Add,&%stamps% - %hotkey% - %timestring%,SEND
}

Menu,Tray,Add
WinGetTitle,title,ahk_id %lastactiveid%
If title=
  WinGet,title,ProcessName,ahk_id %lastactiveid%
StringLeft,shorttitle,title,50
If (shorttitle<>title)
 shorttitle.="..."
Menu,Tray,Add,Active window: %shorttitle%,ACTIVATE

Menu,Tray,Add
Menu,Tray,Add,&Settings...,SETTINGS
Menu,Tray,Add,&About...,ABOUT
Menu,Tray,Add,E&xit,EXIT
Menu,Tray,Tip,%applicationname%
Return


ACTIVATE:
WinActivate,ahk_id %lastactiveid%
Return


SEND:
If (A_TimeSinceThisHotkey<100 And A_TimeSinceThisHotkey<>-1)
{
  Loop,%stamps%
  {
    If (hotkey%A_Index%<>A_ThisHotkey)
      Continue
    string:=stamp%A_Index%
    Gosub,EXPAND
    Send,%timestring%
    Break
  }
}
Else
{
  If A_ThisMenuItemPos=1
    Gosub,EXPAND
  Else
  If A_ThisMenuItemPos>2
  {
    menu:=A_ThisMenuItemPos-2
    string:=stamp%menu%
    Gosub,EXPAND
  }
  WinActivate,ahk_id %lastactiveid%
  WinWaitActive,ahk_id %lastactiveid%,,5
  If ErrorLevel=0
  {
    Send,%timestring%
  }
}
Return


SHELLMESSAGE(wParam,lParam)
{
  Global lastactiveid

  If wParam<>4
    Return
  IfWinNotExist,ahk_id %lParam%
    Return
  WinGetClass,class,ahk_id %lParam%
  If class in Shell_TrayWnd
  {
    Gosub,MENU
    Return
  }
  lastactiveid:=lParam
}


TRAYMESSAGE(wParam,lParam)
{
  If lParam In 517
    Gosub,MENU
  Return
}


EXPAND:
StringGetPos,pos,string,"
If pos=0
  timepos=3
else
  timepos=1
StringSplit,timearray,string,"
LOOP1:
  FormatTime,week,,YWeek
  StringRight,week,week,2
  week+=0
  FormatTime,day,,YDay
  FormatTime,longday,,dddd
  StringLower,dllower,longday
  StringLower,dltitle,longday,T
  StringUpper,dlupper,longday 
  FormatTime,shortday,,ddd
  StringLower,dslower,shortday
  StringLower,dstitle,shortday,T
  StringUpper,dsupper,shortday
  FormatTime,longmonth,,MMMM
  StringLower,mllower,longmonth
  StringLower,mltitle,longmonth,T
  StringUpper,mlupper,longmonth 
  FormatTime,shortmonth,,MMM
  StringLower,mslower,shortmonth
  StringLower,mstitle,shortmonth,T
  StringUpper,msupper,shortmonth
  time=timearray%timepos%
  time:=%time%
  If time=
    Goto,NEXT1
  StringReplace,time,time,nl,&&&,All
  StringReplace,time,time,tab,|||,All
  StringReplace,time,time,week,@@@@,All
  StringReplace,time,time,day,@@@,All
  StringReplace,time,time,dddd,!!!!,All
  StringReplace,time,time,Dddd,$!!!,All
  StringReplace,time,time,DDDD,$$$$,All
  StringReplace,time,time,ddd,!!!,All
  StringReplace,time,time,Ddd,$!!,All
  StringReplace,time,time,DDD,$$$,All
  StringReplace,time,time,mmmm,££££,All
  StringReplace,time,time,Mmmm,§£££,All
  StringReplace,time,time,MMMM,§§§§,All
  StringReplace,time,time,mmm,£££,All
  StringReplace,time,time,Mmm,§££,All
  StringReplace,time,time,MMM,§§§,All
  FormatTime,time,,%time%
  StringReplace,time,time,&&&,`n,All
  StringReplace,time,time,|||,%A_Tab%,All
  StringReplace,time,time,@@@@,%week%,All
  StringReplace,time,time,@@@,%day%,All
  StringReplace,time,time,!!!!,%dllower%,All
  StringReplace,time,time,$!!!,%dltitle%,All
  StringReplace,time,time,$$$$,%dlupper%,All
  StringReplace,time,time,!!!,%dslower%,All
  StringReplace,time,time,$!!,%dstitle%,All
  StringReplace,time,time,$$$,%dsupper%,All
  StringReplace,time,time,££££,%mllower%,All
  StringReplace,time,time,§£££,%mltitle%,All
  StringReplace,time,time,§§§§,%mlupper%,All
  StringReplace,time,time,£££,%mslower%,All
  StringReplace,time,time,§££,%mstitle%,All
  StringReplace,time,time,§§§,%msupper%,All
  timearray%timepos%=%time%
NEXT1:
  timepos+=2
If timepos<=%timearray0%
  Goto,LOOP1
timestring=
timepos=1
LOOP2:
  time=timearray%timepos%
  time:=%time%
  timestring=%timestring%%time%
  timepos+=1
If timepos<=%timearray0%
  Goto,LOOP2
Return


SETTINGS:
Run,TimeStamp.ini
Return


ABOUT:
Gui,99:Destroy
Gui,99:Margin,20,20
Gui,99:Add,Picture,xm Icon1,%applicationname%.exe
Gui,99:Font,W700
Gui,99:Add,Text,x+10 yp+10 Bold,%applicationname% v2.1
Gui,99:Font,W400
Gui,99:Add,Text,y+10,Sends user defined times and dates to the active window.
Gui,99:Add,Text,xp y+5,Doubleclick the tray icon to send the last used date and time.
Gui,99:Add,Text,y+10,Use the Settings menu to change the timestamps and hotkeys.

Gui,99:Add,Picture,xm y+20 G1HOURSOFTWARE Icon2,%applicationname%.exe
Gui,99:Add,Text,x+10 yp,For more tools, information and donations, please visit
Gui,99:Font,W700 CBlue
Gui,99:Add,Text,y+5 G1HOURSOFTWARE,www.1HourSoftware.com
Gui,99:Font,W400 CBlack

Gui,99:Add,Picture,xm y+20 GDONATIONCODER Icon7,%applicationname%.exe
Gui,99:Add,Text,x+10 yp,Please support the contributors at
Gui,99:Font,W700 CBlue
Gui,99:Add,Text,y+5 GDONATIONCODER,www.DonationCoder.com
Gui,99:Font,W400 CBlack

Gui,99:Add,Picture,xm y+20 GAUTOHOTKEY Icon6,%applicationname%.exe
Gui,99:Add,Text,x+10 yp,This tool was made using the powerful
Gui,99:Font,W700 CBlue
Gui,99:Add,Text,y+5 GAUTOHOTKEY,www.AutoHotkey.com
Gui,99:Font,W400 CBlack

Gui,99:Show,,%applicationname% - About
hCurs:=DllCall("LoadCursor","UInt",NULL,"Int",32649,"UInt") ;IDC_HAND
Gui,99:+LastFound
aboutid:=WinExist()
Return

1HOURSOFTWARE:
Run,www.1HourSoftware.com
Return

DONATIONCODER:
Run,www.DonationCoder.com
Return

AUTOHOTKEY:
Run,www.AutoHotkey.com
Return


WM_MOUSEMOVE(wParam,lParam)
{
  Global hCurs
  Global aboutid
  MouseGetPos,,,mwin,mctrl
  If mwin in %aboutid%
  If mctrl in Static8,Static11,Static14
    DllCall("SetCursor","UInt",hCurs)
  Return
}

99GuiEscape:
99GuiClose:
  Gui,99:Destroy
  OnMessage(0x200,"")
  DllCall("DestroyCursor","Uint",hCurs)
Return


EXIT:
  DllCall("DeregisterShellHookWindow",UInt,guiid)
  ExitApp


INIFILE:
IfNotExist,%applicationname%.ini
  FileAppend,
(
[Settings]
stamp1=H:mm:ss" - "dddd" "d.MM.yyy" - d"day" w"weeknl
hotkey1=F1
stamp2=yyy.MM.d" "tabH:mm:ss
hotkey2=F2

;TimeStamp.ini
;
;Hotkeys
;^=Ctrl !=Alt +=Shift #=Window
;
;Examples:
;
;^F1=Ctrl-F1
;+!j=Shift-Alt-j
;
;
;Formatting (case sensitive)
;
;nl   NewLine
;tab  Tab
;     Surround regular text with ""
;
;Date Formats (case sensitive)
;
;d    Day of the month without leading zero (1 - 31)
;dd   Day of the month with leading zero (01 – 31)
;ddd  Lowercase abbreviated name for the day of the week (e.g. mon)
;Ddd  Like ddd, but Titlecase
;DDD  Like ddd, but UPPERCASE
;dddd Lowercase full name for the day of the week (e.g. monday)
;Dddd Like ddd, but Titlecase
;DDDD Like ddd, but UPPERCASE
;M    Month without leading zero (1 – 12)
;MM   Month with leading zero (01 – 12)
;mmm  Lowercase abbreviated month name (e.g. jan)
;Mmm  Like mmm, but Titlecase
;MMM  Like mmm, but UPPERCASE
;mmmm Full month name (e.g. january)
;Mmmm Like mmmm, but Titlecase
;MMMM Like mmmm, but UPPERCASE
;y    Year without century, without leading zero (0 – 99)
;yy   Year without century, with leading zero (00 - 99)
;yyyy Year with century. Example: 2005
;gg   Period/era string for the current user's locale (blank if none)
;Day  Day of the year
;Week Week of the year
;
;Time Formats (case sensitive)
;
;h    Hours without leading zero; 12-hour format (1 - 12)
;hh   Hours with leading zero; 12-hour format (01 – 12)
;H    Hours without leading zero; 24-hour format (0 - 23)
;HH   Hours with leading zero; 24-hour format (00– 23)
;m    Minutes without leading zero (0 – 59)
;mm   Minutes with leading zero (00 – 59)
;s    Seconds without leading zero (0 – 59)
;ss   Seconds with leading zero (00 – 59)
;t    Single character time marker, such as A or P (depends on locale)
;tt   Multi-character time marker, such as AM or PM (depends on locale)
;
;Examples:
;
;H:mm:ss" - "dddd" "d.MM.yyy" - d"day" w"week = 10:49:05 - saturday 14.06.2008 - d166 w24
;yyy.MM.d" "nlH:mm:ss                         = 2008.06.14
;                                               10:49:36
)
,%applicationname%.ini
Return

200
 :( It looks like mr Zidar has dropped standard menus in Screamer beta4, so I don't know if I can make ScreamerMenu work.

Skrommel

Pages: prev1 ... 3 4 5 6 7 [8] 9 10 11 12 13 ... 38next