GregChi Posted September 7, 2006 Report Share Posted September 7, 2006 Win98se How do I get ME to determine if a link is on the desktop? The link is SM56pci LtMoh.lnk I can find a file or directory buy not a .lnk. Quote Link to comment Share on other sites More sharing options...
kevin Posted September 8, 2006 Report Share Posted September 8, 2006 The If File Exists command will work. Here are a couple of sample macros: Simple macro to determine if the file is on the desktop: // Get path to the Desktop Set Variable %T1% to "Path to Desktop" Variable Set String %T4% "SM56pci LtMoh.lnk" If File Exists "%T1%\%T4%" Text Box Display: Found the file End If This macro types the names of all shortcuts on the desktop into Notepad. // Activate or Launch Notepad Activate or Launch: "Notepad" OR "notepad.exe" // Get path to the Desktop Set Variable %T1% to "Path to Desktop" // Loop through all files on the desktop and write the filenames into notepad Repeat with Folder // Get the file extension Variable Set From File Path Text Box Display: DEBUG T1 T2 T3 // Only do this if the file extension is lnk If Variable %T3% = ".lnk" // If Notepad does not have focus, activate it If Not Window Title "Notepad" on top Activate Window: "Notepad" End If // Type the name of the shortcut Text Type: %T2%<ENTER> End If Repeat End Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.