willwatters Posted July 1, 2005 Share Posted July 1, 2005 I want to check if an icon exists on desktop and if not i will send an error message and exit the code. The desktop icon is called CLMS. What is the code for this please? Link to comment Share on other sites More sharing options...
Valuater Posted July 1, 2005 Share Posted July 1, 2005 is the icon a shortcut? $details = FileGetShortcut(@DesktopDir & "\Shortcut Test.lnk") MsgBox(0, "Path:", $details[0]) 6) Link to comment Share on other sites More sharing options...
willwatters Posted July 1, 2005 Author Share Posted July 1, 2005 What i'm trying to do is test if a shortcut icon does not exist on a desktop then i will log an error to file. I changed the CLMS icon to a different name. what is the code to check if the CLMS icon does not exist and if so I can log an error. I tried the above code, but it fails to run with an error message as the CLMS icon does not exist. what is the code for this please Link to comment Share on other sites More sharing options...
Valuater Posted July 1, 2005 Share Posted July 1, 2005 (edited) this is the format $location = **put the location here** If Not FileExists($location) then _FileWriteLog("C:\Text.log", "Menu Setup incomplete") exit endif 8) Edited July 1, 2005 by Valuater Link to comment Share on other sites More sharing options...
FuryCell Posted July 2, 2005 Share Posted July 2, 2005 this is the format$location = **put the location here**If Not FileExists($location) then_FileWriteLog("C:\Text.log", "Menu Setup incomplete")exitendif8)<{POST_SNAPBACK}>Don't Forget to put this at the top of the script.#Include<File.au3>Also if the file is a shortcut on the desktop called CLMS then. $Location=@DesktopDir & "\CLMS.lnk" HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now