AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

help me please :)

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
sleepyy35



Joined: 22 Jul 2004
Posts: 194
Location: cedar city UT

PostPosted: Thu Jul 22, 2004 6:44 am    Post subject: help me please :) Reply with quote

how would you script = FileDelete, C:\temp files\*.tmp
in xp EXAMPLE say you would like to delete your temp files in
xp it would C:\Documents and Settings not c:\temp yes ! i could fill in the path but that would be only good on my pc is there a way around that so others could use my script

C:\Documents and Settings\michael\Local Settings\temp
see the script would only be good on my pc how could i leave the michael out and when someone runs it it would use there name ???
_________________
^sleepy^
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
Beastmaster



Joined: 15 Apr 2004
Posts: 182

PostPosted: Thu Jul 22, 2004 7:25 am    Post subject: Reply with quote

There are environment variables already set on each PC which could be used within an AHKScript e.g.

Quote:
USERPROFILE=C:\Documents and Settings\michael
TEMP=C:\DOCUME~1\michael\LOCALS~1\Temp
TMP=C:\DOCUME~1\michael\LOCALS~1\Temp


The Temp variables could be missing, check this out at your command line:

Quote:
cmd /k set


To solve your issue:

Quote:
MsgBox, %TEMP%\*.tmp ; only for testing
FileDelete, %TEMP%\*.tmp

MsgBox, %TMP%\*.tmp ; only for testing
FileDelete, %TMP%\*.tmp

MsgBox, %USERPROFILE%\Local Settings\temp\*.tmp ; only for testing
FileDelete, %USERPROFILE%\Local Settings\temp\*.tmp
Back to top
View user's profile Send private message
sleepyy35



Joined: 22 Jul 2004
Posts: 194
Location: cedar city UT

PostPosted: Thu Jul 22, 2004 7:28 am    Post subject: :) Reply with quote

ok i will work with that
thanx so much Beastmaster Very Happy
_________________
^sleepy^
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group