topbanner_forum
  *

avatar image

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

Login with username, password and session length
  • December 05, 2019, 09:36 AM
  • Proudly celebrating 13 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 - aCkRiTe [ switch to compact view ]

Pages: [1]
1
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.autohotke...ml&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
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


2
Coding Snacks / Re: Create Multiple Empty Numbered Folders
« on: January 10, 2009, 02:23 AM »
Loop, 150
{
StringLen, Length, A_Index
If Length = 1
FileCreateDir, 00%A_Index%
If Length = 2
FileCreateDir, 0%A_Index%
If Length = 3
FileCreateDir, %A_Index%
}
ExitApp

3
Coding Snacks / Re: Create Multiple Empty Numbered Folders
« on: January 09, 2009, 09:29 AM »
Heres a way with AHK. Just run the script from the directory or location you want the folders to be created.

Loop, 150
FileCreateDir, %A_Index%
ExitApp

If you want to use a batch file you can use this. Of course change the path as needed.

for /l %%i in (1,1,150) do mkdir "C:\Test\%%i"

4
Coding Snacks / Re: Sticky Keys Ahk request
« on: December 15, 2008, 11:24 AM »
If you're not getting the pop-up then its not changing the registry value when it loses the StickyKeys. If thats the case then Im not sure how else to tell that you're losing the StickyKeys.  :(

5
Coding Snacks / Re: Automated folder maker
« on: December 15, 2008, 11:16 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*

#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
Coding Snacks / Re: Sticky Keys Ahk request
« on: December 14, 2008, 01:24 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
Coding Snacks / Re: Sticky Keys Ahk request
« on: December 13, 2008, 12:33 AM »
This is really ugly, but it works for now I guess....  :-[

#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
Coding Snacks / Re: Sticky Keys Ahk request
« on: December 12, 2008, 11:02 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
Coding Snacks / Re: Sticky Keys Ahk request
« on: December 12, 2008, 01:27 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?

10
Post New Requests Here / Re: IDEA : Universal counter for documents
« on: December 11, 2008, 04:17 PM »
See if this works for you... {Win+x} fires the hotkey.  HTH

#SingleInstance Force
#Persistent
#NoEnv
SendMode, Input
SetBatchLines -1
FormatTime, Year, ,yyyy
Cnt = 1

#x::
Click
Send, %Cnt%-%Year%
Cnt++
Return

This is in AHK btw...

11
Coding Snacks / Re: Sticky Keys Ahk request
« on: December 11, 2008, 08:37 AM »
What OS are you using? I tested under WinXP. If you're not using WinXP, check the registry and see what the value is set to when the Sticky Keys are on and then change it in the script.

12
Coding Snacks / Re: Sticky Keys Ahk request
« on: December 10, 2008, 05:04 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...

#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
Post New Requests Here / Re: IDEA: Visualize mouse clicks
« on: October 30, 2007, 04:42 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.autohotke...ckrite/Magnifier.ahk

#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

14
Finished Programs / Re: DONE: Toggle Hidden Files and Folders
« on: October 30, 2007, 09:22 AM »
Combine it with Skrommel's Barnacle.

You can just add the Toggle Hidden Files & Folders script to the end of Skrommel's Barnacle script and add the following .ini file...

[Settings]
class=CabinetWClass
color=E0E0E0

[1]
tip=Toggle Hidden Files
image=C:\Windows\System32\Shell32.dll,36
leftaction=Send,#h
rightaction=Send,#h
middleaction=Send,#h

15
Finished Programs / Re: DONE: Toggle Hidden Files and Folders
« on: October 29, 2007, 04:54 PM »
Here is the documentation on hotkeys for AutoHotKey - http://www.autohotke...com/docs/Hotkeys.htm

Just change the line #h:: to whatever hotkey you would like.

#x:: ===> win-key + x
!x::  ===> alt-key + x
^x:: ===> ctrl-key + x
+x::  ===>shift-key + x

These are just a few examples...

16
Here is an AutoHotKey script that should do the trick...
(BTW this checks both the current user and all users start menu)


#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...

17
Finished Programs / DONE: Toggle Hidden Files and Folders
« on: May 19, 2007, 05:25 PM »
This script toggles(shows or hides) between hidden files and folder with the press of a hotkey. The script was written with AutoHotKey.

Download Toggle Hidden here(source code included): http://www.autohotke.../Toggle%20Hidden.rar
(the hotkey in this script is set to the (WinKey + h)

18
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!

19
Here is a Automatic Minesweeper solver that was written over in the AutoHotKey forum. Its pretty impressive for a single file!

Automatic Minesweeper - http://www.informati...bhao/autosweeper.ahk

Topic at AutoHotKey - http://www.autohotke...ighlight=minesweeper

20
Here is a Wallpaper Changer script that I wrote with AutoHotKey.

Download link - http://www.autohotke...per%20Changer%20.exe

Source Code - http://www.autohotke...per%20Changer%20.ahk

The AutoHotKey Fourm on this - http://www.autohotke...ght=wallpaperchanger

21
Here is a way to do it with AHK. It uses the hotkey (WinKey + H). It also refreshes the window as well...

#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.autohotke.../Toggle%20Hidden.rar


HTH...

Pages: [1]