legend Posted November 15, 2017 Share Posted November 15, 2017 I need to run "run", same thing as when you press windows + R. "run" does not create a new process, so i'm a little unsure how to launch it, besides sending keys such as windows + R Link to comment Share on other sites More sharing options...
TheDcoder Posted November 15, 2017 Share Posted November 15, 2017 Don't know if it works in other versions of Windows but I tested it in Windows 8.1: ShellExecute(@UserProfileDir & '\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\System Tools\Run') EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time) DcodingTheWeb Forum - Follow for updates and Join for discussion Link to comment Share on other sites More sharing options...
legend Posted November 15, 2017 Author Share Posted November 15, 2017 that works, thanks Link to comment Share on other sites More sharing options...
Gianni Posted November 15, 2017 Share Posted November 15, 2017 also Send("#r") Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt.... Link to comment Share on other sites More sharing options...
TheDcoder Posted November 15, 2017 Share Posted November 15, 2017 @Chimp 1 hour ago, legend said: besides sending keys such as windows + R EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time) DcodingTheWeb Forum - Follow for updates and Join for discussion Link to comment Share on other sites More sharing options...
Gianni Posted November 15, 2017 Share Posted November 15, 2017 .... ok.... Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt.... Link to comment Share on other sites More sharing options...
badcoder123 Posted November 15, 2017 Share Posted November 15, 2017 Also Run("C:\WINDOWS\system32\rundll32.exe shell32.dll,#61") taylansan and TheDcoder 2 Link to comment Share on other sites More sharing options...
TheDcoder Posted November 15, 2017 Share Posted November 15, 2017 @badcoder123 Nice! Should be more universal than my solution badcoder123 1 EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time) DcodingTheWeb Forum - Follow for updates and Join for discussion Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted November 15, 2017 Moderators Share Posted November 15, 2017 Or, as AutoIt contains both a Run and a ShellExecute function you could make your script more efficient, bypass the Run box altogether, and save yourself a couple of lines. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
taylansan Posted November 15, 2017 Share Posted November 15, 2017 (edited) 5 hours ago, badcoder123 said: Also Run("C:\WINDOWS\system32\rundll32.exe shell32.dll,#61") Just two questions for leaning: 1. Why did you call shell32? Why not another dll? 2. What does #61 stand for? Such as I tried with #62 (to test) and nothing happens. And where do you get a list of this? Edited November 15, 2017 by taylansan TY. Link to comment Share on other sites More sharing options...
Gianni Posted November 15, 2017 Share Posted November 15, 2017 ... or ShellExecute('shell:::{2559a1f3-21d7-11d4-bdaf-00c04f60b9f0}') p.s. have a look here for some other "shell folders" Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt.... Link to comment Share on other sites More sharing options...
taylansan Posted November 15, 2017 Share Posted November 15, 2017 Similar to the original question, how can I perform other operations such as: Windows + L = to lock the computer Windows + P = to switch to the projector Besides sending keys... If I call shell32 again, which function # would it be? TY. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted November 15, 2017 Moderators Share Posted November 15, 2017 @taylansan Google is your friend. A simple search of "Shell32 dll functions list" returns everything you would want to know. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
taylansan Posted November 15, 2017 Share Posted November 15, 2017 5 minutes ago, JLogan3o13 said: @taylansan Google is your friend. A simple search of "Shell32 dll functions list" returns everything you would want to know. Thanks brother, I did check the list of functions and searched for the keywords such as "lock" or "projector", but couldn't find any proper. http://www.geoffchappell.com/studies/windows/shell/shell32/api/index.htm Yet, I'm asking it for learning way, how to know which function it would be. TY. Link to comment Share on other sites More sharing options...
iamtheky Posted November 15, 2017 Share Posted November 15, 2017 literally search for "command to lock windows" https://www.google.com/search?q=command+to+lock+windows I imagine the first return is going to look eerily similar to @badcoder123's solution. Or use the spoiler. rundll32.exe user32.dll, LockWorkStation ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) Link to comment Share on other sites More sharing options...
badcoder123 Posted November 16, 2017 Share Posted November 16, 2017 8 hours ago, taylansan said: Similar to the original question, how can I perform other operations such as: Windows + L = to lock the computer Windows + P = to switch to the projector Besides sending keys... If I call shell32 again, which function # would it be? Run("C:\WINDOWS\system32\rundll32.exe user32.dll, LockWorkStation") ;or Run("rundll32.exe user32.dll, LockWorkStation") 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