|
3
|
DonationCoder.com Software / Post New Requests Here / Re: simple timer
|
on: September 20, 2008, 06:57:31 PM
|
|
I was not able to get it to work either.
In looking at the AHK Help file it states that the X,Y can be expressions, but it doesn't say that they can be variables. Maybe for the X,Y on tooltip it doesn't recognize variables.....
|
|
|
|
|
5
|
DonationCoder.com Software / Post New Requests Here / Re: simple timer
|
on: September 13, 2008, 02:53:41 AM
|
The Coords are on this line: The first number, 2000 in this case is the left right and the second number, 20, is the up down. You can also add this line right below that line to get a "tray tip" when you hover the mouse over the icon in the tray: Glad you liked it!
|
|
|
|
|
6
|
DonationCoder.com Software / Post New Requests Here / Re: simple timer
|
on: September 13, 2008, 12:11:18 AM
|
Ok So I created another one with the timer showing. It shows in the form of a small tooltip box in the upper right corner of the monitor. See if you like it, the tooltip can be moved around by playing with its coords. [ copy or print] ; ; AutoHotkey Version: 1.x ; Language: English ; Platform: Win9x/NT ; Author: A.N.Other <myemail@nowhere.com> ; ; Script Function: ; Template script (you can customize this template by editing "ShellNew\Template.ahk" in your Windows folder) ; #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. SendMode Input ; Recommended for new scripts due to its superior speed and reliability. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. #persistent #singleinstance off CoordMode, ToolTip, Screen tt = %1% time := Convert_Milliseconds(tt) Sec := (tt * 60) SetTimer, Message, %time% countdown(Sec) return Message: SetTimer, Message, Off msgbox Done! ExitApp Convert_MilliSeconds(time,MS = 1000,M = 60) { return MS*M*time } countdown(p_count="") { countdown_time:=p_count countdown_date=16010101 countdown_date+=%countdown_time%, s Loop { If (countdown_date >= 16010101010000){ FormatTime, mmss, %countdown_date%, hh:mm:ss }else{ FormatTime, mmss, %countdown_date%, mm:ss } ;msgbox %countdown_date%`n%hhmmss% ;//SB_SetText(mmss, 2) Tooltip, %mmss%, 2000,20 Sleep, 1000 countdown_date+=-1, s ;//IfLess, countdown_date, 16010101, break if (A_Index>countdown_time) { break } } }
|
|
|
|
|
8
|
DonationCoder.com Software / Post New Requests Here / Re: simple timer
|
on: September 12, 2008, 09:05:51 PM
|
You may also want to look at this: http://www.autohotkey.com...highlight=countdown+timerAs for my script, I think you got it but I will break it down in any case. The way I envisioned you using it was thus: Copy/Paste the code into a file, called say Timer.ahk. Put this file someplace out of the way, maybe the root of the C:\ drive. Right click on this file and select Send To| Desktop (Create Shortcut). Now right click on this file (the shortcut) go to Properties and put the number of minutes in after the Target line, i.e.: "C:\Documents and Settings\User\Desktop\Timer.ahk" 120 This way you can create multiple timers all running at once if need be. I will look into the countdown thing, I was thinking you only wanted something that would tell you after a certain amount of time had passed. The program I linked to at the beginning of this post is a countdown timer, but I don't know if it is what you want. Below I have explained the script. I hope it fills in any gaps I may have left. #persistent ; Used to keep the application running long enough to use the timer #singleinstance off ; So you can have multiple instances running %1% := 60 * (%1% * 1000) ; Ok so this is where it gets fun, %1% is the number you give to the program (in minutes). SetTimer uses milliseconds so we have to convert that to seconds, then from there to minutes.
SetTimer, Message, %1% ; Here we tell the timer to wait for X amount of time then run the commands at the given label, in this case Message return
Message: SetTimer, Message, Off ; Here I turn the timer off so it doesn't keep running msgbox Done! ; This is what happens when the timer reaches its mark. ExitApp
-Belkira
|
|
|
|
|
10
|
DonationCoder.com Software / Post New Requests Here / Re: IDEA: always-on-top transparent picture viewer
|
on: September 12, 2008, 06:02:50 PM
|
While not perfect, and Im sure someone else will come up with something better here is something that should work. You will need to set the x value and possibly the y value in the gui show line to place the image where you want it. The level for the transparancy is 0 to 255. 0 makes the window invisible while 255 makes it opaque. [ copy or print] fileselectfile, pic,,,Select the picture to use gui,add,picture,w200 h-1, %pic% gui, -sysmenu +toolwindow -caption +alwaysontop gui, show, x1080 y0, Watermark Winset, Transparent,150,Watermark WinSet, ExStyle, +0x00000020, Watermark return guiclose: exitapp
|
|
|
|
|
14
|
DonationCoder.com Software / Post New Requests Here / Re: IDEA: Dynamic shortcuts
|
on: August 13, 2008, 03:54:46 PM
|
wow! i didn't know much about your program's feature until i saw the demo video.  P.S. could have used a more decent codec, though.  Like?? As I said I have never done a screen capture before so I just used what I found. It was either avi or swf and the swf file looked pretty crappy and had a huge file size.....
|
|
|
|
|
17
|
DonationCoder.com Software / Post New Requests Here / Re: IDEA: Dynamic shortcuts
|
on: July 15, 2008, 10:10:38 AM
|
nogojoe, Which version did you try? The original did delete shortcuts if they were the same name as a shortcut being created, but the second version doesn't(shouldn't). As for the deleting of the Drive letter shortcuts I will look into that. I dont keep shortcuts to the drives on my desktop so that issue didn't come up for me. Also I have attached a new version which recurses only 1 level (easily changed) looking for exe files. This version does not remove any drive icons or other existing icons from my desktop. Let me know if you experience something different. [ copy or print] ; ; Program Version: 1.3 ; Language: English ; Author: belkira ; ; Script Function: ; Script to create shortcuts on Desktop for exe files on a removable drive ; and then to remove those shortcuts when the removable drive has been removed. ;Script Usage: ; Launch script on whatever computer(s) you want to have the shortcuts updated on. ; When a new removable drive is inserted, this script will scan for all exe files on the ; removable device, and create shortcuts for them on the users Desktop. ; ; Once removed the script will cleanup any shortcuts that were created. ; #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. SendMode Input ; Recommended for new scripts due to its superior speed and reliability. ;SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. #Persistent First = 0 DriveGET, USB, List, REMOVABLE settimer, check, 500 return check: ret := scan4newDrives(USB) If (First = 0) { ; Copy current shortcuts Loop, %A_Desktop%\*.lnk { FileGetShortcut, %A_LoopFileName%, Target ShortCutTarget = %ShortCutTarget%%Target%\\%A_LoopFileName%`n ;ShortCutName = %ShortCutName%%A_LoopFileName%`n ;MsgBox %ShortCutTarget%`n%ShortCutName% } } First = 1 if (!ret) { UsbDirList := ShortcutList := ;nothing here } else { ; Scan usb drive for applications Usb_Folders = %ret%:\ Loop, %Usb_folders%*.exe, 0, 1 { StringReplace, dummy, A_LoopFileFullPath, \, \, UseErrorLevel If (ErrorLevel > 2) ; ex: "C:\folder1\folder2\folder3\file.ext" continue ; skip files that are 1 or more folders deep UsbDirList = %UsbDirList%%A_LoopFileFullPath%`n } { } Sort UsbDirList, UD`n ;Remove duplicate entries, just in case ; create shortcuts Loop, Parse, UsbDirList, `n { If !A_LoopField Break SplitPath, A_LoopField, Name, Dir, Extension, NameNoExt, OutDrive FileCreateShortcut, %Dir%\%Name%, %A_Desktop%\%NameNoExt%.lnk CreatedShortcuts = %CreatedShortcuts%%A_Desktop%\%NameNoExt%.lnk`n } } ; remove shortcuts if drive removed IfNotExist %OutDrive% If CreatedShortcuts >= 1 { Loop, Parse, CreatedShortcuts, `n { FileDelete, %A_LoopField% CreatedShortcuts = } Loop, Parse, ShortCutTarget, `n { If A_LoopField = Continue SplitPath, A_LoopField, Name, Old_Target StringTrimRight, Target, Old_Target, 1 FileCreateShortcut, %Target%, %A_Desktop%\%Name% ;MsgBox Name=%Name%`nTarget=%Target% } } return scan4newDrives(byref olddrives) { DriveGET, NewUSB, List, REMOVABLE Loop, parse, NewUSB { if InStr(olddrives, a_loopfield) { ;still here } else { ;found new device! olddrives := NewUSB ;update return, % a_loopfield } } olddrives := NewUSB ;update return, 0 ;no new devices found. }
|
|
|
|
|
21
|
DonationCoder.com Software / Post New Requests Here / Re: Hide menu in Start Menu
|
on: June 07, 2008, 10:16:00 PM
|
|
Well these are a bit ugly, and I have not yet figured out how to combine both scripts into one so it takes two scripts. One to hide the apps, and one to unhide them.
Usage:
Launch, check the program(s) you want hidden. Thats it, when you have checked all the boxes of the programs you want hidden just close the app. There is no undo so if you accidentally click on something you didn't want hidden you will have to use the unhider script to unhide it.
Also because of the way Windows is, this hides folders from current users profile, and the all users profile so if someone else uses your pc they may notice things missing.
|
|
|
|
|
23
|
DonationCoder.com Software / Post New Requests Here / Re: Change Desktop Folder
|
on: November 21, 2007, 06:35:13 PM
|
Well, in theory this should work, but it is untested so who knows..... I am still unsure about the refresh method, and looking for something more reliable. [ copy or print] ; ; AutoHotkey Version: 1.x ; Language: English ; Platform: Win9x/NT ; ; ; Script Function: ; Change the location of the Default Desktop Folder through right-click menu on the systray icon. ; #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. SendMode Input ; Recommended for new scripts due to its superior speed and reliability. #Persistent ;Regread, current, HKCU, Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders, Desktop RegWrite, REG_EXPAND_SZ, HKCU, Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders, Desktop, Z:\ runwait, %comspec% /c subst Z: "`%USERPROFILE`%\Desktop",,Hide DllCall("Shell32\SHChangeNotify", UInt, 0x08000000, UInt, 0, UIntP, 0, UIntP, 0) GoSub,INIREAD GoSub,TRAYMENU INIREAD: IfNotExist,%A_ScriptName%.ini { IniWrite,Location 1,%A_ScriptName%.ini,Locations,dir1 IniWrite,Location 2,%A_ScriptName%.ini,Locations,dir2 IniWrite,Location 3,%A_ScriptName%.ini,Locations,dir3 IniWrite,Location 4,%A_ScriptName%.ini,Locations,dir4 IniWrite,`%USERPROFILE`%\Desktop,%A_ScriptName%.ini,Locations,Default } IniRead,dir1,%A_ScriptName%.ini,Locations,dir1 IniRead,dir2,%A_ScriptName%.ini,Locations,dir2 IniRead,dir3,%A_ScriptName%.ini,Locations,dir3 IniRead,dir4,%A_ScriptName%.ini,Locations,dir4 IniRead,default,%A_ScriptName%.ini,Locations,Default Return TRAYMENU: Menu,Tray,NoStandard Menu,Tray,DeleteAll Menu,Tray,Add,Desktop Switcher, CURRENT Menu,Tray,Add, Menu,Tray,Add,"%dir1%",DIR1 Menu,Tray,Add,"%dir2%",DIR2 Menu,Tray,Add,"%dir3%",DIR3 Menu,Tray,Add,"%dir4%",DIR4 Menu,Tray,Add,Default,DEFAULT Menu,Tray,Add Menu,Tray,Add,Edit,EDIT Menu,Tray,Add,Reload,RELOAD Menu,Tray,Add, Menu,Tray,Add,E&xit,EXIT Menu,Tray,Tip,%A_ScriptName% ; Menu,Tray,Check,%current% Return CURRENT: DIR1: runwait %comspec% /c subst Z: /d,,Hide runwait %comspec% /c subst Z: %dir1%,,Hide DllCall("Shell32\SHChangeNotify", UInt, 0x08000000, UInt, 0, UIntP, 0, UIntP, 0) Return DIR2: runwait %comspec% /c subst Z: /d,,Hide runwait %comspec% /c subst Z: %dir2%,,Hide DllCall("Shell32\SHChangeNotify", UInt, 0x08000000, UInt, 0, UIntP, 0, UIntP, 0) Return DIR3: runwait %comspec% /c subst Z: /d,,Hide runwait %comspec% /c subst Z: %dir3% DllCall("Shell32\SHChangeNotify", UInt, 0x08000000, UInt, 0, UIntP, 0, UIntP, 0) Return DIR4: runwait %comspec% /c subst Z: /d runwait %comspec% /c subst Z: %dir4% DllCall("Shell32\SHChangeNotify", UInt, 0x08000000, UInt, 0, UIntP, 0, UIntÃ…, 0) Return DEFAULT: RegWrite, REG_EXPAND_SZ, HKCU, Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders, Desktop, %default% DllCall("Shell32\SHChangeNotify", UInt, 0x08000000, UInt, 0, UIntP, 0, UIntÃ…, 0) ExitApp Return EDIT: Runwait,%A_ScriptName%.ini Return RELOAD: Reload EXIT: ExitApp
|
|
|
|
|
24
|
DonationCoder.com Software / Post New Requests Here / Re: Change Desktop Folder
|
on: November 21, 2007, 01:38:25 PM
|
|
To go along with inshadow, I have tried his idea and it works great. I have not had any time to try to put it into a program yet, but if you want to see how it works you can do this.
Change the registry so it points to say....k: for the desktop folder then maybe create a batch file that has the following in it: subst k: /d subst k: "whatever folder"
Using it this way will require a logoff/on.
I would create a couple of those batch scripts and put different destination folders. After the initial logoff/on all that is required after running the batch file is to press F5
I will see if I can get a minute to throw a script together unless someone beats me to it....
|
|
|
|
|