Next Generation Emulation banner
1 - 13 of 13 Posts

·
Registered
Joined
·
7 Posts
Discussion Starter · #1 · (Edited)
Here I'm going to explain how to make a shortcut that will easily toggle your normal mouse cursor to a stylus cursor, and then back again each time you click it.

First download and Install AutoHotKey from this link AutoHotkey Download

After the program installs run it, you should get this popup


Click yes and a text document opens up. Select All and delete

Now paste the following into the document:

;
; AutoHotkey Version: 1.x
; Language: English
; Platform: Win9x/NT
; Author: Farhan Ahmad <[email protected]>
;
; Script Function:
; Swaps the mouse cursor schemes between the given one and "Windows Default."
;

#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.

; Windows Aero scheme is a system scheme in Windows Vista and will be defined
; as a user scheme in other versions.
if (A_OSVersion = "WIN_VISTA") {
SwapCursors("Windows Aero", 2)
} else {
SwapCursors("Windows Aero", 1)
}

; Function Name:
; SwapCursors
;
; Description:
; This function swaps the mouse cursors schemes between the Windows Default
; and the given scheme.
;
; Parameters:
; schemeName - Name of the other scheme.
; schemeSource - Type of the scheme.
; 0 - None Windows Default (Probably not going to be used)
; 1 - User Scheme
; 2 - System Scheme
;
SwapCursors(schemeName, schemeSource)
{
CursorKeyNames = Arrow,Help,AppStarting,Wait,Crosshair,IBeam,NWPen,No,SizeNS,SizeWE,SizeNWSE,SizeNESW,SizeAll,UpArrow,Hand
RegRead currentScheme, HKEY_CURRENT_USER, Control Panel\Cursors
if (currentScheme = schemeName) {
schemeName = Stylus
schemeSource = 1
}

; Figure out the key that the scheme is saved at.
If (schemeSource = 0) { ; Windows default
registryKey = SOFTWARE\Microsoft\Windows\CurrentVersion\Control Panel\Cursors\Schemes
registryRoot = HKEY_LOCAL_MACHINE
} else if (schemeSource = 1) { ; User scheme
registryKey = Control Panel\Cursors\Schemes
registryRoot = HKEY_CURRENT_USER
} else if (schemeSource = 2) { ; System scheme
registryKey = SOFTWARE\Microsoft\Windows\CurrentVersion\Control Panel\Cursors\Schemes
registryRoot = HKEY_LOCAL_MACHINE
} else {
MsgBox Invalid scheme type
exit
}
;MsgBox %registryKey% %registryRoot% %schemeName% %schemeSource%

; Read the scheme
RegRead schemeToUse, %registryRoot%, %registryKey%, %schemeName%

; Write out the basic info about the new scheme
if (schemeName = "Windows Default") {
RegWrite REG_SZ, HKEY_CURRENT_USER, Control Panel\Cursors, ,
} else {
RegWrite REG_SZ, HKEY_CURRENT_USER, Control Panel\Cursors, , %schemeName%
}
RegWrite REG_DWORD, HKEY_CURRENT_USER, Control Panel\Cursors, Scheme Source, %schemeSource%

; Remove any double quotes from the scheme
StringReplace schemeToUse, schemeToUse, `", , All

; Replace the keys.
StringSplit schemeCursors, schemeToUse, `,
Loop, Parse, CursorKeyNames, `,
{
RegWrite REG_EXPAND_SZ, HKEY_CURRENT_USER, Control Panel\Cursors, %A_LoopField%, % schemeCursors%A_Index%
}

; Load the new cursors
SPI_SETCURSORS := 0x57
result := DllCall("SystemParametersInfo", "UInt", SPI_SETCURSORS, "UInt", 0, "UInt", 0, "UInt", 0)
;MsgBox Error Level: %ErrorLevel% `nLast error: %A_LastError%`nresult: %result%
}
Save and exit the text document.

Open up control panel and search for mouse, then click "Change how the mouse pointer looks"


Double click "Normal Select"


Now find and double click "aero_pen_xl.cur"


Click "Save As..."


Type in "Stylus" and click OK


Now close everything and go to "C:\Program Files\AutoHotkey" or "C:\Program Files (x86)\AutoHotkey" if you're on a 64bit OS

Right click AutoHotkey.exe and click Send to... Desktop (Create Shortcut)


Close everything and rename the new shortcut on your desktop to Stylus


*Note* The rest of this is optional, only do it if you want the shortcut on your desktop to look like a stylus

Save this file to anywhere on your computer (I put mine in my No%GBA folder) https://dl.dropbox.com/u/3046224/stylus.ico

Right click the Stylus shortcut on your desktop and click Properties, in the window that pops up click "Change Icon"


Click "Browse" and locate and double click that stylus icon file you saved (Mine is in my No$GBA folder)


Click OK, and then click OK on the next window

That's it! Now just double click the Stylus icon on your desktop to change your cursor to a stylus, and double click it again to change back to normal! Sorry that there were so many steps, but it's worth it IMO, hope you enjoy, and happy gaming with your stylus!

Note that this tutorial was written using Windows 7 64bit, so if something isn't the same for your OS then just find something similar (such as the stylus cursor icon filenames)

Also if you use myZoom by testerHooK heres a realistic DS skin to go with your new stylus: https://dl.dropbox.com/u/3046224/Jjiinx DS Skin.png

This is how the new skin and stylus looks in game:

-Jjiinx
 

·
Registered
Joined
·
2,614 Posts
Great! Works in Windows XP? xD
 

·
Hackin 'n Slashin
Joined
·
28,630 Posts
I can't see anything that would prevent it from working other than I don't think XP has that cursor...though as far as I remember it does have a pen cursor which resembles it (though it's yellow or blue I think).
 

·
Registered
Joined
·
7 Posts
Discussion Starter · #6 ·
It is possible to switch back to a custom cursor scheme other than the system default?

Thanks!
Go to your documents folder and edit AutoHotkey.ahk to this:

;
; AutoHotkey Version: 1.x
; Language: English
; Platform: Win9x/NT
; Author: Farhan Ahmad <[email protected]>
;
; Script Function:
; Swaps the mouse cursor schemes between the given one and "Windows Default."
;

#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.

; Windows Aero scheme is a system scheme in Windows Vista and will be defined
; as a user scheme in other versions.
if (A_OSVersion = "WIN_VISTA") {
SwapCursors("Windows Aero", 2)
} else {
SwapCursors("Windows Aero", 1)
}

; Function Name:
; SwapCursors
;
; Description:
; This function swaps the mouse cursors schemes between the Windows Default
; and the given scheme.
;
; Parameters:
; schemeName - Name of the other scheme.
; schemeSource - Type of the scheme.
; 0 - None Windows Default (Probably not going to be used)
; 1 - User Scheme
; 2 - System Scheme
;
SwapCursors(schemeName, schemeSource)
{
CursorKeyNames = Arrow,Help,AppStarting,Wait,Crosshair,IBeam,NWPen,No,SizeNS,SizeWE,SizeNWSE,SizeNESW,SizeAll,UpArrow,Hand
RegRead currentScheme, HKEY_CURRENT_USER, Control Panel\Cursors
if (currentScheme = schemeName) {
schemeName = Stylus
schemeSource = 1
}

; Figure out the key that the scheme is saved at.
If (schemeSource = 0) { ; Windows default
registryKey = Control Panel\Cursors\Schemes
registryRoot = HKEY_CURRENT_USER
} else if (schemeSource = 1) { ; User scheme
registryKey = Control Panel\Cursors\Schemes
registryRoot = HKEY_CURRENT_USER
} else if (schemeSource = 2) { ; System scheme
registryKey = Control Panel\Cursors\Schemes
registryRoot = HKEY_CURRENT_USER
} else {
MsgBox Invalid scheme type
exit
}
;MsgBox %registryKey% %registryRoot% %schemeName% %schemeSource%

; Read the scheme
RegRead schemeToUse, %registryRoot%, %registryKey%, %schemeName%

; Write out the basic info about the new scheme
if (schemeName = "Windows Default") {
RegWrite REG_SZ, HKEY_CURRENT_USER, Control Panel\Cursors, ,
} else {
RegWrite REG_SZ, HKEY_CURRENT_USER, Control Panel\Cursors, , %schemeName%
}
RegWrite REG_DWORD, HKEY_CURRENT_USER, Control Panel\Cursors, Scheme Source, %schemeSource%

; Remove any double quotes from the scheme
StringReplace schemeToUse, schemeToUse, `", , All

; Replace the keys.
StringSplit schemeCursors, schemeToUse, `,
Loop, Parse, CursorKeyNames, `,
{
RegWrite REG_EXPAND_SZ, HKEY_CURRENT_USER, Control Panel\Cursors, %A_LoopField%, % schemeCursors%A_Index%
}

; Load the new cursors
SPI_SETCURSORS := 0x57
result := DllCall("SystemParametersInfo", "UInt", SPI_SETCURSORS, "UInt", 0, "UInt", 0, "UInt", 0)
;MsgBox Error Level: %ErrorLevel% `nLast error: %A_LastError%`nresult: %result%
}
Now go edit the custom cursor theme you want to set to default and rename it to Windows Aero (Just click save as... and type in Windows Aero)
 

·
Hackin 'n Slashin
Joined
·
28,630 Posts
Wait...are you asking to change the cursor permanently in Windows...in other words change the system default? In that case forget this additional program and just stop at the 6th step where you are browsing the available cursors, select the one you want and press open, this will close the browsing window and you will see the window in step 5 again and there just click Apply and Ok and you have yourself a new system default.
 

·
Registered
Joined
·
7 Posts
Discussion Starter · #8 ·
Wait...are you asking to change the cursor permanently in Windows...in other words change the system default? In that case forget this additional program and just stop at the 6th step where you are browsing the available cursors, select the one you want and press open, this will close the browsing window and you will see the window in step 5 again and there just click Apply and Ok and you have yourself a new system default.
No, the script will toggle between the stylus cursor and the system default cursor, what he's asking if it's possible to make it switch between the stylus cursor and another custom set cursor that he already had, and what I posted above will explain how
 

·
Hackin 'n Slashin
Joined
·
28,630 Posts
Seems like a strange request to have 3 sets of cursors operating on a system, but whatever floats his boat then I guess.
 

·
Hackin 'n Slashin
Joined
·
28,630 Posts
Oh so this program automatically loads what it thinks (is programmed to see as) the default windows cursor rather than loading whatever cursor is currently set as system default on that system?

In other words this program automatically reloads the normal pointer even if his actual default is a cool sword or something?
 

·
Registered
Joined
·
7 Posts
Discussion Starter · #12 ·
Oh so this program automatically loads what it thinks (is programmed to see as) the default windows cursor rather than loading whatever cursor is currently set as system default on that system?

In other words this program automatically reloads the normal pointer even if his actual default is a cool sword or something?
Correct, follow the other tutorial as well if you want to use a custom cursor as your normal one
 

·
Hackin 'n Slashin
Joined
·
28,630 Posts
Nah, I don't see using the Vista redesigned pen cursor for no$gba as so revolutionary so I am not into this was just checking up on the goings on here as the Handheld Section Moderator.

Seems a little silly that this program works like that though but after having taken a close look at the code I understand why. O well carry on.
 
1 - 13 of 13 Posts
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top