|
1
|
DonationCoder.com Software / Post New Requests Here / Re: Idea: Simple Key Text Encryption Program
|
on: January 26, 2009, 10:36:11 AM
|
Not exactly sure if this is what you're looking for, but I thought I'd post it. So basically this is an RC4 encryption that I used from http://www.autohotkey.com...98.html&highlight=rc4. How it works: 1. run the script (it can be left running at all times) 2. when you want to encrypt something simply copy the text to the clipboard and then fire the hotkey (ctrl + alt + z) 3. you will be prompted to enter a password which is used for the encryption 4. once you enter a password your text will then be encrypted and then placed back to the clipboard. 5. send your encrypted text to someone that has the same script 6. they place the encrypted text to the clipboard and fire the hotkey (ctrl + alt + z) 7. they have to enter the same password you used to encrypt the text 8. the text will then be decrypted and the original text that you wrote will be placed to the clipboard AHK [ copy or print] SingleInstance Force #Persistent #NoEnv SetBatchLines, -1 ^!x:: Password: InputBox, PW, Password, Enter a password., , 200, 125 If ErrorLevel <> 0 ExitApp If PW = Goto, Password Data = %Clipboard% Gosub, RC4 Clipboard = %Result% Return RC4: ATrim = %A_AutoTrim% AutoTrim, Off BLines = %A_BatchLines% SetBatchlines, -1 StringLen, PWLen, PW IfNotEqual, PW, %OldPW% { Loop, 256 { a := A_Index - 1 Transform, ModVal, Mod, %a%, %PWLen% ModVal ++ StringMid, C, PW, %ModVal%, 1 Transform, AscVar, Asc, %C% Key%a% = %AscVar% sBox%a% = %a% } b = 0 Loop, 256 { a := A_Index - 1 TempVar := b + sBox%a% + Key%a% Transform, b, Mod, %TempVar%, 256 T := sBox%a% sBox%a% := sBox%b% sBox%b% = %T% } OldPW = %PW% } StringLen, DataLen, Data Result = i = 0 j = 0 Loop, %DataLen% { TmpVar := i + 1 Transform, i, Mod, %TmpVar%, 256 TmpVar := sBox%i% + j Transform, j, Mod, %TmpVar%, 256 TmpVar := sBox%i% + sBox%j% Transform, TmpVar2, Mod, %TmpVar%, 256 k := sBox%TmpVar2% StringMid, TmpVar, Data, %A_Index%, 1 Transform, AscVar, Asc, %TmpVar% Transform, C, BitXOR, %AscVar%, %k% IfEqual, C, 0 C = %k% Transform, ChrVar, Chr, %C% Result = %Result%%ChrVar% } AutoTrim, %ATrim% SetBatchlines, %BLines% Return GuiClose: ExitApp
|
|
|
|
|
5
|
DonationCoder.com Software / Coding Snacks / Re: Automated folder maker
|
on: December 15, 2008, 11:16:42 AM
|
Here is an AHK script that should do it for you. This assumes you have 1 directory with many .pdf files in it, it will loop through getting each file name and create a new directory(within the main/root directory) with the current file name then move the file in to the new directory with the matching name. *I have tested, but you should always have a backup or copy of the directory you're working on before using this script*[ copy or print] #SingleInstance Force #Persistent #NoEnv SetBatchLines -1 FileSelectFolder, Root, , , Select Root Folder If ErrorLevel = 1 Reload Loop, %Root%\*.pdf { StringTrimRight, Folder, A_LoopFileName, 4 FileCreateDir, %Root%\%Folder% FileMove, %A_LoopFileFullPath%, %Root%\%Folder%\%A_LoopFileName% } ExitApp
|
|
|
|
|
6
|
DonationCoder.com Software / Coding Snacks / Re: Sticky Keys Ahk request
|
on: December 14, 2008, 01:24:12 AM
|
|
Well I hope it will do for now CleverCat. I know its ugly, but will try to see if I get figure out a better method for you.
and thanks Cranioscopical... I dont visit the forum that often, but try to help out when I can. Its a great forum and a lot of help all around...
|
|
|
|
|
7
|
DonationCoder.com Software / Coding Snacks / Re: Sticky Keys Ahk request
|
on: December 13, 2008, 12:33:13 AM
|
This is really ugly, but it works for now I guess....  [ copy or print] #SingleInstance Force #Persistent #NoEnv SetTimer, Timer, 2000 Timer: OldValue := OutputVar RegRead, OutputVar, HKEY_CURRENT_USER, Control Panel\Accessibility\StickyKeys, Flags IfNotEqual, OldValue, %OutputVar% If OutputVar <> 511 { MsgBox, 68, Sticky Keys, The Sticky Keys are turned off. Would you like to turn them on? IfMsgBox Yes { RegWrite, REG_SZ, HKEY_CURRENT_USER, Control Panel\Accessibility\StickyKeys, Flags, 511 Run, Access.cpl WinWait, Accessibility Options WinWaitActive, Accessibility Options Send, {Space}{Enter} } } Return
|
|
|
|
|
8
|
DonationCoder.com Software / Coding Snacks / Re: Sticky Keys Ahk request
|
on: December 12, 2008, 11:02:39 AM
|
|
Yes that is correct... I see whats happening now. When you click on yes in the message box to turn on the Sticky Keys, it updates the registry with the correct value, but if you run access.cpl, you will notice the check box for use Sticky Keys is still not checked. Im not sure why, but will see if there is anything I can come up with that updates to turn the Sticky Keys on. I assumed changing the registry value would do this, but thats not the case.
|
|
|
|
|
9
|
DonationCoder.com Software / Coding Snacks / Re: Sticky Keys Ahk request
|
on: December 12, 2008, 01:27:28 AM
|
|
So when you lose the Sticky Keys, have you checked to see what the registry value is set at right after you lose them? If so, what is the value set at? If not, look and see without the script running. I get 510 when off and 511 when on. If you're saying the values match, then Im not too sure what the problem could be. Has anyone else tested the script or have any ideas?
|
|
|
|
|
12
|
DonationCoder.com Software / Coding Snacks / Re: Sticky Keys Ahk request
|
on: December 10, 2008, 05:04:15 PM
|
Here is an AHK script that checks every second to see if the Sticky Keys are on or off. If they are turned off, a pop-up will appear letting you know they are turned off and give you the option to turn them on. If you choose not to the script will exit cause the pop-up will not go away if they are off. I assume this is what you were looking for. Feel free to tweak in anyway. HTH... [ copy or print] #SingleInstance Force #Persistent #NoEnv SetBatchLines -1 SetTimer, Timer, 1000 Timer: RegRead, OutputVar, HKEY_CURRENT_USER, Control Panel\Accessibility\StickyKeys, Flags If OutputVar <> 511 { MsgBox, 68, Sticky Keys, The Sticky Keys are turned off. Would you like to turn them on? IfMsgBox Yes RegWrite, REG_SZ, HKEY_CURRENT_USER, Control Panel\Accessibility\StickyKeys, Flags, 511 Else ExitApp } Return
|
|
|
|
|
13
|
DonationCoder.com Software / Post New Requests Here / Re: IDEA: Visualize mouse clicks
|
on: October 30, 2007, 04:42:01 PM
|
I played around with a few scripts to do this with AHK, but cant seem to get any to work perfectly. I came up with another idea that might be of some use to you. This script basically magnifies a certain area around the mouse pointer when the middle mouse button is pressed and sets the screen back to normal when it is pressed a second time. So the middle mouse button is the toggle key for it, which you can change to any hotkey or mouse button you would like. You can also adjust the size of the magnifying box by using the (+) and (-) signs on the numpad. I browsed the AHK forum for a magnifying script so this is not entirely my script, I just modified it to hopefully fit your needs, if not maybe some others will have some use for it. Link - http://www.autohotkey.net/~ackrite/Magnifier.ahk[ copy or print] #SingleInstance Force #Persistent #NoEnv SendMode, Input SetBatchLines, -1 CoordMode, Mouse ~MButton:: Sleep, 400 Zoom := 4 ; Zoom Factor Rate := 2 ; Rate of increase/decrease MinSize := 10 ; Minimum size of gui Width := 250 Height := 250 ToolTip, %A_Space% WinGet, hWnd, ID, ahk_class tooltips_class32 WinSet, ExStyle, +0x00000020, ahk_id %hWnd% hDC_SC := DllCall("GetDC", "Uint", 0) hDC_TT := DllCall("GetDC", "Uint", hWnd) Loop { MouseGetPos, xmouse, ymouse DllCall("StretchBlt" , "Uint", hDC_TT ; handle to destination DC , "int", 0 ; x-coord of destination upper-left corner , "int", 0 ; y-coord of destination upper-left corner , "int", 2*Width ; width of destination rectangle , "int", 2*Height ; height of destination rectangle , "Uint", hDC_SC ; handle to source DC , "int", Xmouse-Width//Zoom ; x-coord of source upper-left corner , "int", Ymouse-Height//Zoom ; y-coord of source upper-left corner , "int", 2*Width//Zoom ; width of source rectangle , "int", 2*Height//Zoom ; height of source rectangle , "Uint", 0x00CC0020) ; raster operation code WinMove, ahk_id %hWnd%,, Xmouse-Width, Ymouse-Height, 2*Width, 2*Height WinSet, AlwaysOnTop, On, ahk_id %hWnd% GetKeyState, StateAdd, NumpadAdd GetKeyState, StateSub, NumpadSub If StateAdd = D Width += Rate, Height += Rate If StateSub = D { If (Width >= MinSize) && (Height >= MinSize) Width -= Rate, Height -= Rate } GetKeyState, MButton, Mbutton, P If MButton = D Break } Reload Esc:: ExitApp
|
|
|
|
|
16
|
Main Area and Open Discussion / General Software Discussion / Re: Extracting executable program shortcuts from start menu?
|
on: May 21, 2007, 10:13:41 AM
|
Here is an AutoHotKey script that should do the trick... (BTW this checks both the current user and all users start menu) [ copy or print] #SingleInstance Force #Persistent #NoEnv SetBatchLines, -1 SetWorkingDir, %A_StartMenu% User = %A_StartMenu% Start: Loop, *.lnk { File = %A_LoopFileFullPath% FileGetShortcut, %A_LoopFileLongPath%, Var Loop, %Var% { If A_LoopFileExt = exe Msgbox, %User%`n`n%File% = %Var% } } If User = %A_StartMenuCommon% ExitApp SetWorkingDir, %A_StartMenuCommon% User = %A_StartMenuCommon% Goto, Start HTH...
|
|
|
|
|
18
|
DonationCoder.com Software / Post New Requests Here / Re: IDEA: Show/ Do not Show Hidden files and folders
|
on: May 19, 2007, 12:28:12 PM
|
|
Well I glad you like it and your welcome. I have never used Autoit3 so I dont know too much about it, though I hear they are similar. I dont know if Autoit3 is more or less powerful than AHK, but AHK can do A LOT in my opinion and the people over at the forum are finding that out more each day. I would highly recommand AutoHotKey! I picked it up about 10 months ago and it was so easy to learn. Only background I had in scripting was Windows Shell Scripting, but was able to pick AHK up quickly. They have great documentation and a great forum. Hope this information was some what helpful and some of it is just my opinion. BTW I just came across this forum the other day. I hope to be a little active over here, seems like a great forum!
|
|
|
|
|
21
|
DonationCoder.com Software / Post New Requests Here / Re: IDEA: Show/ Do not Show Hidden files and folders
|
on: May 17, 2007, 10:04:01 AM
|
Here is a way to do it with AHK. It uses the hotkey (WinKey + H). It also refreshes the window as well... [ copy or print] #SingleInstance Force #Persistent #NoEnv SetBatchLines, -1 #h:: CheckActiveWindow: ID := WinExist("A") WinGetClass,Class, ahk_id %ID% WClasses := "CabinetWClass ExploreWClass" IfInString, WClasses, %Class% GoSub, Toggle_HiddenFiles_Display Return Toggle_HiddenFiles_Display: RootKey = HKEY_CURRENT_USER SubKey = Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced RegRead, HiddenFiles_Status, % RootKey, % SubKey, Hidden If HiddenFiles_Status = 2 RegWrite, REG_DWORD, % RootKey, % SubKey, Hidden, 1 Else RegWrite, REG_DWORD, % RootKey, % SubKey, Hidden, 2 PostMessage, 0x111, 28931,,, ahk_id %ID% Return You can downlaod here http://www.autohotkey.net...krite/Toggle%20Hidden.rarHTH...
|
|
|
|
|