Jump to content

New to AutoIt


Recommended Posts

Not to doubt you ResNullius, but it doesn't seem to be working for me. Thanks for your help man, any idea why its not letting me do this? Does having autoit follow a link cause issues?

Did you cut and paste my code to try?

If so and it's still not working, then can you browse to

c:\ProgramData\Microsoft\Windows\Start Menu\Programs\Games

and do you see a "GameExplorer.lnk" there?

If so, double click on it and see if it opens the Game Explorer. If it does, then that means the AutoIt code as provided should work. If the "GameExplorer.lnk" isn't there, then do a serach for it and find out where it's hiding. Otherwise, it must have been deleted...

Link to comment
Share on other sites

I did indeed just C&P your code and after browsing to the given directory the shortcut is there. Nonetheless the autoit code doesn't launch it. But, when i remove the final file target it opens the

c:\ProgramData\Microsoft\Windows\Start Menu\Programs\Games

directory just fine.

Would it matter that all the shortcuts in the directory have actual targets IE:

"%ProgramFiles%\Microsoft Games\Purble Place\PurblePlace.exe"

except the Games Explorer? The Games explorer's target is just called 'Games'.

Also could it matter that I don't see the .lnk extension to the shortcut files, even though i have display known extension on in the folder options?

Link to comment
Share on other sites

I did indeed just C&P your code and after browsing to the given directory the shortcut is there. Nonetheless the autoit code doesn't launch it. But, when i remove the final file target it opens the

c:\ProgramData\Microsoft\Windows\Start Menu\Programs\Games

directory just fine.

Would it matter that all the shortcuts in the directory have actual targets IE:

"%ProgramFiles%\Microsoft Games\Purble Place\PurblePlace.exe"

except the Games Explorer? The Games explorer's target is just called 'Games'.

Also could it matter that I don't see the .lnk extension to the shortcut files, even though i have display known extension on in the folder options?

OH OH... my bad, I should have cut and pasted instead of retyping into my post.

I had an "s" in the "GamesExplorer.lnk", should be just "GameExplorer.lnk with no "s"... sorry

ShellExecute(@StartMenuCommonDir & "\Programs\Games\GameExplorer.lnk")
Link to comment
Share on other sites

Just out of curiosity, where does GameExplorer.lnk point to?

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

Like i said, its integrated into the explorer shell. But the lnk itself claims to target Games .. nothing else. there is no Start in:, the Target Location: is Desktop, even target type is: Games...

BTW Resnullius, You're a god <_<

i would have never guessed to make it singular, what a bizarre thing...

Well thanks! Now i can make my autohotkey that launches on startup and opens GE when i hit the worthless MD button :) YAY

Edited by HawkShark
Link to comment
Share on other sites

Haha Ironically enough AutoHotkey doesn't have the shellexecute command, any ideas for how to either make a background process that will trigger the command when a button is pushed or, what the autohotkey equiv to shellexecute is?

Damnit i was retarded and figured they used the same programming language...

EDIT: Nevermind, thanks for the help... I solved it :-P

Edited by HawkShark
Link to comment
Share on other sites

Haha Ironically enough AutoHotkey doesn't have the shellexecute command, any ideas for how to either make a background process that will trigger the command when a button is pushed or, what the autohotkey equiv to shellexecute is?

Damnit i was retarded and figured they used the same programming language...

WHAT??? Did you say the "AutoH" word??? Don't THEY have a forum???

Seriously though, I don't know their syntax, but you could use a Run command instead

Run(@COMSPEC & ' /c START  "" "'&  @StartMenuCommonDir & '\Programs\Games\GameExplorer.lnk"',"", @SW_HIDE)
Edited by ResNullius
Link to comment
Share on other sites

It's one of those "namespace" special folder things, like "Control Panel"...

There's some info on msdn, this is about using WMI with it: http://msdn2.microsoft.com/en-us/library/bb173451.aspx

Based on your link someone with Vista might want to try

ShellExecute("::{F382DA49-9148-4a22-AF78-C378DFC32D02}")

Edit: There is probably a registry entry under spacial folders that will return the path as well.

Edited by GEOSoft

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...