topbanner_forum
  *

avatar image

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

Login with username, password and session length
  • Tuesday April 23, 2024, 1:30 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 2 3 [4] 5 6 7 8 9 ... 38next
76
 :) I just updated GreenOSD above!

Removed a few bugs and added options to place the status anywhere on the screen.

Skrommel

77
 :) Try changing the MONITOFF procedure:

Skrommel

MONITOFF:
IfWinActive,ahk_class eHome Render Window
  SendMessage,0x112,0xF170,2,,Program Manager
Return

78
 :) Try MoveToDate!

Moves files from the desktop to a folder named the current date.

Just edit the first lines to change the source and target folders, what files to ignore and if it should move when the program starts or ends.

Skrommel


;MoveToDate.ahk
; Moves files from the desktop to a folder named the current date
;Skrommel @ 2009

from=%A_Desktop%          ;Where to look for files
to=%A_Desktop%            ;Where to move the files
name=Moved                ;Name of the base folder
ignore=%name%,Notepad2    ;Comma separated list of file names to ignore, no unnessesary spaces!
moveonexit=0              ;0=move instantly  1=move when the program ends

#SingleInstance,Force
#NoEnv
#Persistent,On

applicationname=MoveToDate

If moveonexit=0
  Goto,MOVE
OnExit,MOVE
Return


MOVE:
date:=A_YYYY "-" A_MM "-" A_DD " " A_Hour "-" A_Min
FileCreateDir,% to "\" name "\" date
Loop,% from "\*.*",1,0
{
  TrayTip,%applicationname%,% "Moving`n " A_LoopFileLongPath "`nto`n " to "\" name "\" date "\" A_LoopFileName
  If A_LoopFileName Contains %ignore%
    Continue
  IfInString,A_LoopFileAttrib,D
    FileMoveDir,%A_LoopFileLongPath%,% to "\" name "\" date "\" A_LoopFileName
  Else
    FileMove,%A_LoopFileLongPath%,% to "\" name "\" date "\" A_LoopFileName
}
ExitApp

79
 :) Try Percentage!

Calculates how far a progressbar has moved, in percentage .
Press F1, then click at the start, inside and at the end of the progressbar.

Skrommel

;Percentage.ahk
; Calculates how far a progressbar has moved, in percentage
; Press F1, then click at the start, inside and at the end of the progressbar
;Skrommel @ 2009

#SingleInstance,Force
#NoEnv
CoordMode,Mouse,Screen
CoordMode,ToolTip,Screen
Return

F1::
tip=
(
To calculate the percentage, click
  1 - at the start
  2 - inside
  3 - at the end
of the progress bar
)
ToolTip,% tip
Hotkey,~LButton,LBUTTON,On
counter=0
Return


LBUTTON:
counter+=1
MouseGetPos,mx%counter%,my%counter%
ToolTip,%counter%
If counter=3
{
  Sleep,1000
  ToolTip,% Floor((mx2-mx1)/(mx3-mx1)*100) "%",% mx2,% my2
  Hotkey,~LButton,LBUTTON,Off
}
Return

80
Post New Requests Here / Re: IDEA: program menu printing
« on: April 10, 2009, 04:21 AM »
 :-[ You guys...

Skrommel

81
 :tellme: WallpaperVolume above changes the volume when the wallpaper changes.

Every second it checks the name of the current wallpaper, and if it matches one in the list, it changes the volume accordingly.

Skrommel

82
Post New Requests Here / Re: IDEA: run an executeable step by step
« on: April 08, 2009, 08:30 PM »
 :) There are antivirus programs out there that will do this, but I'd suggest using Sandboxie insted. It captures and moves all file and registry writes to a sandbox for easy retrieval.

Skrommel

83
 :) This topic has been discussed at lenths at the AutoHotkey forum. Try SKAN's scancode utility at http://www.autohotkey.com/forum/viewtopic.php?t=22881, or shaun's at http://www.autohotkey.com/forum/topic39574.html.

Skrommel

84
 :) Read part 2.5.3 on Restore on AC Power Loss of the manual at http://dlcdnet.asus.com/pub/ASUS/mb/socket939/A8N5X/e2138_a8n5x.pdf

Skrommel

86
Post New Requests Here / Re: IDEA: program menu printing
« on: April 08, 2009, 07:17 PM »
 :) Try GetMenus!

Press F1 to extract the menus of the active window to a text file.

Skrommel

;GetMenus.ahk
; Press F1 to extract the menus of the active window to a text file
;Skrommel @ 2009

#SingleInstance,Force
SetBatchLInes,-1
AutoTrim,Off


F1::
WinGet,hWnd,ID,A
wholemenu=
space=
hMenu:=DllCall("user32\GetMenu","UInt",hWnd)
GETMENU(hMenu)
FileDelete,%A_Temp%\Menus.txt
FileAppend,%wholemenu%,%A_Temp%\Menus.txt
Run,%A_Temp%\Menus.txt
Return


GETMENU(hMenu)
{
  nMaxCount=100
  uFlag:=0x0400  ;MF_BYPOSITION
  global wholemenu
  global space

  menuitemcount:=DllCall("GetMenuItemCount",UInt,hMenu)
  Loop,%menuitemcount%
  {
    nPos:=A_Index-1
    VarSetCapacity(lpString,100,0) ; line inserted on 2008-02-18 -- Hope you dont mind Skrommel! - Moderator!
    length:=DllCall("user32\GetMenuString","UInt",hMenu,"UINT",nPos,"STR",lpString,"int",nMaxCount,"UINT",uFlag)
    wholemenu=%wholemenu%%nPos%%A_Tab%%space%%lpString%`n
    hSubMenu:=DllCall("user32\GetSubMenu","UInt",hMenu,"int",nPos)
    If hSubMenu>-1
    {
      Loop,3
        space=%space%%A_Space%
      GETMENU(hSubMenu)
      StringTrimRight,space,space,3
    }
  }
  Return
}

87
 :) Try MovingMouse!

Helps locate the mouse when it's moved after being inactive for a while.

Just edit the waitfor, hideafter and tag to configure the settings.

Skrommel


;MovingMouse.ahk
; Helps locate the mouse when it's moved after being inactive for a while
;Skrommel @ 2009

waitfor=10            ;How many seconds to wait before tagging the mouse
hideafter=5           ;How many seconds to tag the mouse
tag=>> OVER HERE <<  ;Text to display next to the mouse

#SingleInstance,Force
#Persistent,On
#NoEnv
SetWorkingDir,%A_ScriptDir%

CoordMode,Mouse,Screen

SetTimer,MOVED,1000
inactive=0
Return


MOVED:
oldmx:=mx
oldmy:=my
MouseGetPos,mx,my
If (mx=oldmx And my=oldmy)
  inactive+=1
Else
{
  If (inactive>waitfor)
  {
    SetTimer,HIDE,% hideafter*1000
    SetTimer,SHOW,100
  }
  inactive=0
}
Return


SHOW:
  ToolTip,%tag%
Return


HIDE:
SetTimer,HIDE,Off
SetTimer,SHOW,Off
ToolTip,
Return

88
 :) Try RunIn!

Shows a list of programs to choose to open associated file types in.

Just compile it and associate the file types you want to control with the compiled exe.

The first time it is run, it creates an ini-file with a list of the programs to choose from. Just edit this file to suit your needs.

It's just an early draft, just test it and see if you can use it.

Skrommel


;RunIn.ahk
; Shows a list of programs to choose to open associated file types in
;Skrommel @ 2009

#NoEnv
#SingleInstance,Force
SetBatchLines,-1

applicationname=RunIn

INIREAD:
IfNotExist,%applicationname%.ini
{
ini=
(
[1]
name=Notisblokk
exepath=C:\Windows\Notepad.exe
workfolder=
parameters=
iconpath=
iconnumber=

[2]
name=WordPad
exepath=C:\Programfiler\Windows NT\Tilbehør\wordpad.exe
workfolder=
parameters=
iconpath=
iconnumber=

[Settings]
)
FileAppend,%ini%,%applicationname%.ini
ini=
}

; Create the ListView and its columns:
Gui,+ToolWindow +AutoSize +Resize
Gui, Add, ListView, x0 y0 vlistview GLISTVIEW AltSubmit, Name|Program|WorkFolder|Parameters
LV_ModifyCol(3, "Integer")  ; For sorting, indicate that the Size column is an integer.

; Create an ImageList so that the ListView can display some icons:
ImageListID1 := IL_Create(10)
ImageListID2 := IL_Create(10, 10, true)  ; A list of large icons to go with the small ones.

; Attach the ImageLists to the ListView so that it can later display the icons:
LV_SetImageList(ImageListID1)
LV_SetImageList(ImageListID2)

; Ensure the variable has enough capacity to hold the longest file path. This is done
; because ExtractAssociatedIconA() needs to be able to store a new filename in it.
VarSetCapacity(Filename, 260)
sfi_size = 352
VarSetCapacity(sfi, sfi_size)

; Gather a list of file names from the selected folder and append them to the ListView:
GuiControl, -Redraw, listview  ; Improve performance by disabling redrawing during load.
Loop
{
  IniRead,name,%applicationname%.ini,%A_Index%,name
  IniRead,exepath,%applicationname%.ini,%A_Index%,exepath
  IniRead,workfolder,%applicationname%.ini,%A_Index%,workfolder
  IniRead,parameters,%applicationname%.ini,%A_Index%,parameters
  IniRead,iconpath,%applicationname%.ini,%A_Index%,iconpath
  IniRead,iconnumber,%applicationname%.ini,%A_Index%,iconnumber
  If (exepath="" Or exepath="ERROR")
  {
    GuiControl, +Icon, listview    ; Switch to icon view.
    GuiControl, +Redraw, listview  ; Improve performance by disabling redrawing during load.
    Gui,Show
    Return
  }
  If (name="" Or name="ERROR")
    SplitPath,exepath,name
  If (parameters="ERROR")
    parameters=
  If (iconpath="" Or iconpath="ERROR")
    iconpath:=exepath
  FileName:=iconpath  ; Must save it to a writable variable for use below.

  ; Build a unique extension ID to avoid characters that are illegal in variable names,
  ; such as dashes.  This unique ID method also performs better because finding an item
  ; in the array does not require search-loop.
  SplitPath, FileName,,, FileExt  ; Get the file's extension.
  If FileExt in EXE,ICO,ANI,CUR
  {
    ExtID := FileExt  ; Special ID as a placeholder.
    IconNumber = 0  ; Flag it as not found so that these types can each have a unique icon.
  }
  Else  ; Some other extension/file-type, so calculate its unique ID.
  {
    ExtID = 0  ; Initialize to handle extensions that are shorter than others.
    Loop 7     ; Limit the extension to 7 characters so that it fits in a 64-bit value.
    {
      StringMid, ExtChar, FileExt, A_Index, 1
      If not ExtChar  ; No more characters.
        break
      ; Derive a Unique ID by assigning a different bit position to each character:
      ExtID := ExtID | (Asc(ExtChar) << (8 * (A_Index - 1)))
    }
    ; Check if this file extension already has an icon in the ImageLists. If it does,
    ; several calls can be avoided and loading performance is greatly improved,
    ; especially for a folder containing hundreds of files:
    IconNumber := IconArray%ExtID%
  }
  If Not IconNumber  ; There is not yet any icon for this extension, so load it.
  {
    ; Get the high-quality small-icon associated with this file extension:
    If Not DllCall("Shell32\SHGetFileInfoA", "str", FileName, "uint", 0, "str", sfi, "uint", sfi_size, "uint", 0x101)  ; 0x101 is SHGFI_ICON+SHGFI_SMALLICON
      IconNumber = 9999999  ; Set it out of bounds to display a blank icon.
    Else ; Icon successfully loaded.
    {
      ; Extract the hIcon member from the structure:
      hIcon = 0
      Loop 4
        hIcon += *(&sfi + A_Index-1) << 8*(A_Index-1)
      ; Add the HICON directly to the small-icon and large-icon lists.
      ; Below uses +1 to convert the returned index from zero-based to one-based:
      IconNumber := DllCall("ImageList_ReplaceIcon", "uint", ImageListID1, "int", -1, "uint", hIcon) + 1
      DllCall("ImageList_ReplaceIcon", "uint", ImageListID2, "int", -1, "uint", hIcon)
      ; Now that it's been copied into the ImageLists, the original should be destroyed:
      DllCall("DestroyIcon", "uint", hIcon)
      ; Cache the icon to save memory and improve loading performance:
      IconArray%ExtID% := IconNumber
    }
  }

  ; Create the new row in the ListView and assign it the icon number determined above:
  LV_Add("Icon" . IconNumber, name, exepath, workfolder, parameters)
}
GuiControl, +Redraw, listview  ; Re-enable redrawing (it was disabled above).
LV_ModifyCol()  ; Auto-size each column to fit its contents.
LV_ModifyCol(3, 60) ; Make the Size column at little wider to reveal its header.
Return


LISTVIEW:
If A_GuiEvent = Normal  ; There are many other possible values the script can check.
{
  LV_GetText(name, A_EventInfo, 1)  ; Get the text of the first field.
  LV_GetText(exepath, A_EventInfo, 2)  ; Get the text of the second field.
  LV_GetText(workfolder, A_EventInfo, 3)
  LV_GetText(parameters, A_EventInfo, 4)
  Run,%exepath% "%1%" %parameters%,%workfolder%, UseErrorLevel
  If ErrorLevel
    MsgBox,Could not open "%exepath%.
  ExitApp
}
Return


GuiSize:  ; Expand or shrink the ListView in response to the user's resizing of the window.
If A_EventInfo = 1  ; The window has been minimized.  No action needed.
  Return
; Otherwise, the window has been resized or maximized. Resize the ListView to match.
GuiControl, Move, listview, % "W" . (A_GuiWidth) . " H" . (A_GuiHeight)
Return


GuiClose:
ExitApp

89
Coding Snacks / Re: List of folders to be copied automatically
« on: April 08, 2009, 10:26 AM »
 :) Here's a quick AutoHotkey script.

Change the two first lines of the script. Also, the Excel can only contain one column.

Skrommel

excelfile=Files.xls
target=C:\Target\

#SingleInstance,Force
SendMode,Input
SetTitleMatchMode,2

Run,%excelfile%
WinWait,Excel
WinActivate,Excel
WinWaitActive,Excel
Sleep,1000
Send,^{Home}
Sleep,1000
Send,^+{End}
Sleep,1000
Send,^c
Sleep,1000
StringSplit,file_,Clipboard,`n
WinClose,Excel

Loop,%file_0%
{
  file:=file_%A_Index%
  MsgBox,%file%
  If file<>
    FileMove,%file%,%target%
}

90
Post New Requests Here / Re: Dim inactive monitor after x seconds
« on: March 24, 2009, 06:21 PM »
 :) Test this script for me, I'm single monitor at the moment.

It only shows the level of inactivity of the monitors.

Skrommel

monitor1limit=60
monitor2limit=60

#SingleInstance,Force
#NoEnv
#Persistent,On
CoordMode,Mouse,Screen

SysGet,monitorcount,MonitorCount
Loop,% monitorcount
{
  SysGet,monitor%A_Index%,Monitor,%A_Index%
  monitor%A_Index%idle=0 
}

SetTimer,CHECK,1000
Return

CHECK:
times=
MouseGetPos,mx,my,mwin,mctrl
Loop,% monitorcount
{
  If A_TimeIdlePhysical>1000
    monitor%A_Index%idle+=1
  Else
  If (mx>=monitor%A_Index%Left And mx<=monitor%A_Index%Right And my>=monitor%A_Index%Top And my<=monitor%A_Index%Bottom)
    monitor%A_Index%idle=0
  times.=A_Index "=" monitor%A_Index%idle "`n"
  If (monitor%A_Index%idle>monitor%A_Index%limit And monitor%A_Index%limit>0)
    GoSub,DIM
}
ToolTip,% times
Return

DIM:
MsgBox,DIM!
Return

91
@Coeluh:

 :) Try adding
WinActivateWait,Photoshop
WinWaitActive,Photoshop
before the Send command.

Skrommel

92
 :) Here's a similar tool which could easily be altered to suit your needs.

RenamePDF - Rename PDF files to the internal name found in the /Title tag.

Skrommel

;RenamePDF.ahk
; Rename PDF files to the internal name found in the /Title tag
;Skrommel @ 2008

recurse=0 ;change to 1 to recurse subfolders

#SingleInstance,Force
#NoEnv
SetBatchLines,-1

applicationname=RenamePDF

FileSelectFolder,source,%A_ScriptDir%,3,%applicationname%`nSelect where to look for PDF-files to rename

needle:="/Title(" ;the text to look for
hexneedle:=Asc2Hex(needle)

;Stolen from Lazlo and others at http://www.autohotkey.com/forum/topic25925-30.html

;;;;; Initialization of 2 machine code functions, for setting input and showing results
MCode(Hex2Bin,"568b74240c8a164684d2743b578b7c240c538ac2c0e806b109f6e98ac802cac0e10"
. "4880f8a164684d2741a8ac2c0e806b309f6eb80e20f02c20ac188078a16474684d275cd5b5f5ec3")
MCode(Bin2Hex,"8B54240C85D2568B7424087E3A53578B7C24148A07478AC8C0E90480F9090F97C3F"
. "6DB80E30702D980C330240F881E463C090F97C1F6D980E10702C880C130880E464A75CE5F5BC606005EC3")

Loop,%source%\*.pdf,0,%recurse%
{
  filename:=A_LoopFileLongPath
  BinRead(filename,F)  ; binary haystack
  Hex2Bin(H,hexneedle) ; binary search string
  QtBuf(Q,QLen,H,20)   ; Make RegEx quote
  foundpos:=RegExMatch(F,Q)-1
  If foundpos<0
    Continue
  BinRead(filename,F,255,foundpos+StrLen(needle))
  Loop,Parse,F,`n
  {
    StringTrimRight,foundtext,A_LoopField,1
    StringReplace,foundtext,foundtext,\,,All
    SplitPath,filename,name,dir,ext,name_no_ext,drive
    MsgBox,4,%applicationname%,Rename`n %filename%`nto`n %dir%\%foundtext%.pdf
    IfMsgBox,Yes
    {
      newname:=foundtext
      Loop
      {
        IfNotExist,%dir%\%newname%.pdf
          Break
        InputBox,newname,%applicationname%,File %foundtext% exists`nRename,,,,,,,,%newname%
        If ErrorLevel=1
          Break
      }
      FileMove,%filename%,%dir%\%newname%.pdf
      Break
    }
  }
}
Return


Asc2Hex(needle)
{
  hexneedle=
  SetFormat,Integer,Hex
  Loop,Parse,needle
  {
    char:=Asc(A_LoopField)
    StringMid,char,char,3,2
    hexneedle:=hexneedle . char
  }
  SetFormat,Integer,Dec
  Return,%hexneedle%
}


QtBuf(ByRef Q, ByRef QLen, ByRef B, BLen) { ; replace each \E with \E\E\Q, enclose in \E..\Q
   RegExReplace(B, "\\E","",n)
   QLen := BLen+4*n+4
   VarSetCapacity(Q,QLen,1)
   If (n > 0) {
      VarSetCapacity(C,QLen-4,1)
      C := RegExReplace(B, "\\E", "\E\E\Q") ; AHK copies result over \0's
      Q := RegExReplace(C, ".*", "\Q$0\E")  ; enclose result in \E..\Q
   } Else
      Q := RegExReplace(B, ".*", "\Q$0\E")
}


BinRead(file, ByRef data, n=0, offset=0)  {  ; n = #bytes/all; neg offset from end
   h := DllCall("CreateFile",Str,file, UInt,0x80000000, UInt,3, UInt,0, UInt,3, UInt,0, UInt,0)
   m := 2*(offset < 0)                       ; offset >= 0 : m = 0; offset < 0: m = 2
   DllCall("SetFilePointerEx",UInt,h, Int64,offset, UIntP,U, Int,m)
   m := DllCall("GetFileSize",UInt,h, Int64P,r)
   If n not between 1 and %m%
      n = %m%
   VarSetCapacity(data, n, 1)
   DllCall("ReadFile",UInt,h, UInt,&data, UInt,n, UIntP,r, UInt,0)
   DllCall("CloseHandle", UInt,h)
   Return r
}


Bin2Hex(addr,len) {       ; convert binary data at addr to hex stream
   Local hex
   VarSetCapacity(hex,2*len+1)
   Dllcall(&Bin2Hex, "uint",&hex, "uint",addr, "uint",len, "cdecl")
   VarSetCapacity(hex,-1) ; update StrLen
   Return hex
}


Hex2Bin(ByRef buf, hex) { ; convert hex stream to binary data
   Global Hex2Bin
   VarSetCapacity(buf,(StrLen(hex)+1)//2,1)
   Dllcall(&Hex2Bin, "uint",&buf, "uint",&hex, "cdecl")
}


MCode(ByRef code, hex) {  ; allocate memory and write Machine Code there
   VarSetCapacity(code,StrLen(hex)//2)
   Loop % StrLen(hex)//2
      NumPut("0x" . SubStr(hex,2*A_Index-1,2), code, A_Index-1, "Char")
}

93
Skrommel's Software / Re: Request on CreateShortcutThere
« on: February 12, 2009, 08:44 PM »
Yes, have a look at the source code. Click the A icon on my web page, save the file as CreateShortcutThere.ahk and open it in Notepad. to run it, also downlaod and install AutoHotkey from www.autohotkey.com. skrommel

94
 :) Try AlphaList!

It's just a quick hack, but give it a go.
To change the folder, edit the line folder=.

Skrommel

;AlphaList.ahk
; Order and run a list of PDF files, switch files using PgUp and PgDown
;Skrommel @ 2009

#NoEnv
#SingleInstance,Force
CoordMode,Mouse,Screen

;Edit this line to change folder
folder=C:\PDFs
type=*.pdf

Gui,1:Add,Button,Default GRUN,&Run
Gui,1:Add,ListView,GLISTVIEW Vlistview AltSubmit -ReadOnly,Order|Filename|Path
items=_
Loop,%folder%\%type%,0,1
{
  items=%items%|%A_Index%
  LV_Add("","_",A_LoopFileName,A_LoopFileLongPath)
}
Gui,1:+LastFound +Resize
guiid1:=WinExist()
LV_ModifyCol(2,"Auto")
LV_ModifyCol(3,0)
Gui,1:Show
Return


ITEM:
Gui,2:Submit
ToolTip,%item%.%row%
Gui,1:Default
LV_Modify(row,"",item)
Return


LISTVIEW:
If A_GuiEvent In E,Normal
{
  row:=A_EventInfo
  Gui,1:Default
  LV_GetText(order,row,1)
  MouseGetPos,mx,my
  Gui,2:Destroy
  Gui,2:+Owner1
  Gui,2:Margin,0,0
  Gui,2:-Caption ;+AlwaysOnTop
  Gui,2:Add,ListBox,% "GITEM Vitem Choose" order+1,%items%
  Gui,2:Show,% "X" mx "Y" my
}
Return


RUN:
LV_ModifyCol(1,"Sort")
rows:=LV_GetCount()
current=0
Gosub,NEXT
Return


#IfWinExist AlphaList
PgDn::
NEXT:
current+=1
If (current>rows)
  current=%rows%
Gosub,SHOW
Return


#IfWinExist AlphaList
PgUp::
PREVIOUS:
current-=1
If (current<rows)
  current=1
Gosub,SHOW
Return


SHOW:
LV_GetText(filename,current,3)
Run,%filename%
Return



GuiSize:
If A_EventInfo=1  ;Minimized
  Return
GuiControl,Move,listview,% "W" . (A_GuiWidth-20) . " H" . (A_GuiHeight - 40)
Return

95
 :) Try MostRecent!

Select the start folder, and it will recurse the folder and set it's and all it's subfolders' modifed date/time to the most recently modified file or folder it contains.

Skrommel

;MostRecent.ahk
; Set folder modifed date/time to most recently modified file it contains.
; To run, save this script as MostRecent.ahk, and install AutoHotkey from www.autohotkey.com.
;Skrommel @ 2009

#NoEnv
#SingleInstance,Force

FileSelectFolder,folder,C:\,3,Select a folder to change the date/time of
TRAVERSE(folder)
Return


TRAVERSE(folder)
{
  mostrecent=0
  Loop,%folder%\*.*,1,0
  {
    IfInString,A_LoopFileAttrib,D
      childrecent:=TRAVERSE(A_LoopFileLongPath)
    If (childrecent>mostrecent)
      mostrecent:=childrecent
    If (A_LoopFileTimeModified>mostrecent)
      mostrecent:=A_LoopFileTimeModified
  }
  MsgBox,%mostrecent%`n%folder%
  FileSetTime,%mostrecent%,%folder%,M,2,0
  Return,%mostrecent%
}

96
 :) Have you tried AntiFreeze from www.resplendence.com/antifreeze?

Skrommel

97
Post New Requests Here / Re: Idea: Pop out from directory
« on: January 23, 2009, 07:27 PM »
 :tellme: Try MoveUp!

Not heavily tested... Just download, compile to an exe using AutoHotkey, run it and choose Install MoveUp into SendTo.

To use it, select the files to move to the parent folder, rightclick one of them and choose SendTo - MoveUp.

Skrommel

;MoveUp.ahk
; Rightclick one or more files and select the contextmenu SendTo - MoveUp
;  to move the files to the parent folder
;Skrommel @ 2009

#NoEnv
#SingleInstance,Off
#NoTrayIcon

applicationname=MoveUp

If 0=0
{
  Gosub,ABOUT
  Return
}

Loop,%0%
{
  filename:=%A_Index%
  Loop,%filename%,1,0
  {
    SplitPath,A_LoopFileLongPath,,dir
    Break
  }
  SplitPath,dir,,parentdir
  Break
}

error=0
Loop,%0%
{
  filename:=%A_Index%
  Loop,%filename%,1,0
  {
    SplitPath,A_LoopFileLongPath,name
    Break
  }
  filename=%dir%\%name%
;  MsgBox,%0%:Moving`n %filename%`nto`n %parentdir%\%name%
  FileGetAttrib,attrib,%filename%
  IfInString,filename,D
  {
    FileMoveDir,%filename%,%parentdir%\%name%
    If errorlevel=1
      error+=1
  }
  Else
  {
    FileMove,%filename%,%parentdir%\%name%
    If errorlevel=1
      error+=1
  }
}
If error>0
  ToolTip,Error! %error% files were not moved!
Else
  ToolTip,Success! %0% files were moved!
Sleep,3000
ExitApp


INSTALL:
RegRead,sendto,HKEY_CURRENT_USER,Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders,SendTo
IfNotExist,%sendto%\%applicationname%.lnk
  FileCreateShortcut,%A_WorkingDir%\%applicationname%,%sendto%\%applicationname%.lnk,,,,%A_WorkingDir%\%applicationname%.exe,,1,
IfNotExist,%sendto%\%applicationname%.lnk
  MsgBox,0,%applicationname%,Unable to install MoveUp!
Else
  MsgBox,0,%applicationname%,MoveUp installed in SendTo!
Gosub,ABOUT
Return


UNINSTALL:
RegRead,sendto,HKEY_CURRENT_USER,Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders,SendTo
IfExist,%sendto%\%applicationname%.lnk
  FileDelete,%sendto%\%applicationname%.lnk
IfExist,%sendto%\%applicationname%.lnk
  MsgBox,0,%applicationname%,Unable to remove MoveUp!
Else
  MsgBox,0,%applicationname%,MoveUp removed from SendTo!
Gosub,ABOUT
Return


ABOUT:
Gui,Destroy
Gui,Margin,20,20
Gui,Add,Picture,xm Icon1,%applicationname%.exe
Gui,Font,Bold
Gui,Add,Text,x+10 yp+10,%applicationname% v1.0
Gui,Font
Gui,Add,Text,y+10,Rightclick one or more files and select the contextmenu SendTo - MoveUp
Gui,Add,Text,xp y+5,to move the files to the parent folder

RegRead,sendto,HKEY_CURRENT_USER,Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders,SendTo
IfNotExist,%sendto%\%applicationname%.lnk
  Gui,Add,Button,GINSTALL,&Install MoveUp into SendTo
Else
  Gui,Add,Button,GUNINSTALL,&Remove MoveUp from SendTo

Gui,Add,Picture,xm y+20 Icon2,%applicationname%.exe
Gui,Font,Bold
Gui,Add,Text,x+10 yp+10,1 Hour Software by Skrommel
Gui,Font
Gui,Add,Text,y+10,For more tools, information and donations, please visit
Gui,Font,CBlue Underline
Gui,Add,Text,y+5 G1HOURSOFTWARE,www.1HourSoftware.com
Gui,Font

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

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

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

1HOURSOFTWARE:
  Run,http://www.1hoursoftware.com,,UseErrorLevel
Return

DONATIONCODER:
  Run,https://www.donationcoder.com,,UseErrorLevel
Return

AUTOHOTKEY:
  Run,http://www.autohotkey.com,,UseErrorLevel
Return

GuiClose:
  Gui,Destroy
  OnMessage(0x200,"")
  DllCall("DestroyCursor","Uint",hCur)
  ExitApp
Return

WM_MOUSEMOVE(wParam,lParam)
{
  Global hCurs
  MouseGetPos,,,,ctrl
  If ctrl in Static8,Static12,Static16
    DllCall("SetCursor","UInt",hCurs)
  Return
}
Return

EXIT:
ExitApp

98
Post New Requests Here / Re: IDEA: Modem Blocker!
« on: January 21, 2009, 03:01 AM »
How about disabling your serial port?

Download and extract http://www.yeahware.com/download/enable.zip. Place the Enable.exe in the same folder as the script below.

Just change the device= line in the script to match the start of the device to toggle, and schedule the script to run every night and morning.

Skrommel

;ToggleHardware.ahk
; Enables or disables a hardware device
; Download and extract Enable.exe from http://www.yeahware.com/download/enable.zip
;To run this script download AutoHotkey from http://www.autohotkey.com
;Skrommel @ 2008

#NoEnv
#SingleInstance,Force
SendMode,Input

;Change this line so it matches the start of the device to toggle
device=Comm

Run,Enable.exe
WinWait,Enable and Disable Devices
WinActivate,Enable and Disable Devices
WinWaitActive,Enable and Disable Devices
Send,%device%
Sleep,1000
Send,!ce
Sleep,1000
Send,!cd
WinWait,Change Device Status
WinActivate,Change Device Status
WinWaitActive,Change Device Status
Send,{Enter}
Sleep,1000
WinClose,Enable and Disable Devices

99
Post New Requests Here / Re: IDEA: Windows Control
« on: January 18, 2009, 02:57 PM »
 :) Try RightMax!

This one catches the rightclicks! It slows down single rightclicks, though...

Skrommel

;RightMax.ahk
; Doublerightclick in a window to maximize or restore it
;Skrommel @ 2009

#NoEnv
#SingleInstance,Force
SetWinDelay,0
CoordMode,Mouse,Screen
SendMode Input

RegRead,dblclickspeed,HKEY_CURRENT_USER,Control Panel\Mouse,DoubleClickSpeed
SysGet,dblclickx,36
SysGet,dblclicky,37
time:=A_TickCount
Return

$RButton::
oldmx:=mx
oldmy:=my
oldmwin:=mwin
oldmctrl:=mctrl
MouseGetPos,mx,my,mwin,mctrl
oldtime:=time
time:=A_TickCount
SetTimer,RIGHT,% "-" dblclickspeed
If (mx<oldmx-dblclickx Or mx>oldmx+dblclickx Or my<oldmy-dblclicky Or my>oldmy+dblclicky Or time-oldtime>dblclickspeed Or mwin<>oldmwin)
  Return
SetTimer,RIGHT,Off
WinGet,minmax,MinMax,ahk_id %mwin%
If minmax=0
  WinMaximize,ahk_id %mwin%
Else
  WinRestore,ahk_id %mwin%
Return

RIGHT:
Click,Right
Return

100
 :-[ Yes.

Skrommel

Pages: prev1 2 3 [4] 5 6 7 8 9 ... 38next