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, 9:31 pm
  • 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 - togikun [ switch to compact view ]

Pages: [1]
1
Post New Requests Here / Re: Change Desktop Folder
« on: November 10, 2007, 06:20 AM »
The code i pasted is a modified version of belkiras script. I added a call to SHChangeNotify, which forces explorer to refresh the desktop. And like I said, it works on my computer perfectly (the original script needed a manual refresh, either by F5 or by restarting explorer. this version doesn't)

2
Post New Requests Here / Re: Change Desktop Folder
« on: November 10, 2007, 05:59 AM »
Here, try this. It should work. (At least it worked on my computer, running Windows XP SP2)

;
; 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
GoSub,INIREAD
GoSub,TRAYMENU

INIREAD:
IfNotExist,%A_ScriptName%.ini
{
  IniWrite,%current%,%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
}
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
Return




TRAYMENU:

Menu,Tray,NoStandard
Menu,Tray,DeleteAll
Menu,Tray,Add,%current%,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,
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:
RegWrite, REG_EXPAND_SZ, HKCU, Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders, Desktop, %dir1%
DllCall("Shell32\SHChangeNotify", UInt, 0x08000000, UInt, 0, UIntP, 0, UIntP, 0)
Reload
Return

DIR2:
RegWrite, REG_EXPAND_SZ, HKCU, Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders, Desktop, %dir2%
DllCall("Shell32\SHChangeNotify", UInt, 0x08000000, UInt, 0, UIntP, 0, UIntP, 0)
Reload
Return

DIR3:
RegWrite, REG_EXPAND_SZ, HKCU, Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders, Desktop, %dir3%
DllCall("Shell32\SHChangeNotify", UInt, 0x08000000, UInt, 0, UIntP, 0, UIntP, 0)
Reload
Return

DIR4:
RegWrite, REG_EXPAND_SZ, HKCU, Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders, Desktop, %dir4%
DllCall("Shell32\SHChangeNotify", UInt, 0x08000000, UInt, 0, UIntP, 0, UIntÃ…, 0)
Reload
Return

EDIT:
Runwait,%A_ScriptName%.ini
Return

RELOAD:
Reload

EXIT:
ExitApp


3
Post New Requests Here / Re: Idea - Public Pc Timer
« on: November 09, 2007, 10:30 AM »
What would be the purpose of such a program? To just see how long every single person uses the computer?

4
Post New Requests Here / Re: Change Desktop Folder
« on: November 09, 2007, 10:28 AM »
TweakUI and similar programs can change the path, altough not by right-clicking a tray icon. It sounds like what you want to do is the same thing as another guy in a recent thread. I think they found that DesktopX can do something close to what you want to do.

5
This is not a very elegant solution, but it does the job.

;
; Author:  Togi <[email protected]>
;

#NoEnv
SendMode Input

KeyIsDown = 0

UpperDelay = 700

UpperDelay *= -1

return

KeyDown(key)
{
  global KeyIsDown
  global LastKey
  if (KeyIsDown < 1 or key <> LastKey)
  {
    KeyIsDown := true
    LastKey := key
    Send %key%
    SetKeyDelay, 65535
    SetTimer, ReplaceWithUpper, %UpperDelay%
  }
  return
}

KeyUp(key)
{
  global KeyIsDown
  global LastKey
  SetTimer, ReplaceWithUpper, Off
  KeyIsDown := false
  return
}

ReplaceWithUpper:
  SetKeyDelay, -1
  Send {Backspace}+%LastKey%
return

a:: KeyDown("a")
b:: KeyDown("b")
c:: KeyDown("c")
d:: KeyDown("d")
e:: KeyDown("e")
f:: KeyDown("f")
g:: KeyDown("g")
h:: KeyDown("h")
i:: KeyDown("i")
j:: KeyDown("j")
k:: KeyDown("k")
l:: KeyDown("l")
m:: KeyDown("m")
n:: KeyDown("n")
o:: KeyDown("o")
p:: KeyDown("p")
q:: KeyDown("q")
r:: KeyDown("r")
s:: KeyDown("s")
t:: KeyDown("t")
u:: KeyDown("u")
v:: KeyDown("v")
w:: KeyDown("w")
x:: KeyDown("x")
y:: KeyDown("y")
z:: KeyDown("z")

a Up:: KeyUp("a")
b Up:: KeyUp("b")
c Up:: KeyUp("c")
d Up:: KeyUp("d")
e Up:: KeyUp("e")
f Up:: KeyUp("f")
g Up:: KeyUp("g")
h Up:: KeyUp("h")
i Up:: KeyUp("i")
j Up:: KeyUp("j")
k Up:: KeyUp("k")
l Up:: KeyUp("l")
m Up:: KeyUp("m")
n Up:: KeyUp("n")
o Up:: KeyUp("o")
p Up:: KeyUp("p")
q Up:: KeyUp("q")
r Up:: KeyUp("r")
s Up:: KeyUp("s")
t Up:: KeyUp("t")
u Up:: KeyUp("u")
v Up:: KeyUp("v")
w Up:: KeyUp("w")
x Up:: KeyUp("x")
y Up:: KeyUp("y")
z Up:: KeyUp("z")

Pages: [1]