blazyng Posted December 18, 2017 Share Posted December 18, 2017 Hi all, maybe im just a bit dumb but i have a problem running a run simple Run Command.. this is my code Func test() #RequireAdmin Run("'C:\Program Files (x86)\Notepad++\notepad++.exe'", "'C:\Program Files (x86)\Notepad++'" ,@SW_MAXIMIZE ,"" ) EndFunc Thanks in advance! Link to comment Share on other sites More sharing options...
blazyng Posted December 18, 2017 Author Share Posted December 18, 2017 Exit Code is 0 and Notepad++ does not open Link to comment Share on other sites More sharing options...
Developers Jos Posted December 18, 2017 Developers Share Posted December 18, 2017 Correct, why would it run notepad++ with that code as the Func is never called. Jos blazyng 1 SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
SlackerAl Posted December 18, 2017 Share Posted December 18, 2017 You also need to lose the single quotes ' ' you have around everything, This will work: test() Func test() Run("C:\Program Files (x86)\Notepad++\notepad++.exe", "C:\Program Files (x86)\Notepad++" ,@SW_MAXIMIZE ,"" ) EndFunc blazyng 1 Problem solving step 1: Write a simple, self-contained, running, replicator of your problem. Link to comment Share on other sites More sharing options...
blazyng Posted December 18, 2017 Author Share Posted December 18, 2017 Oh god..you are right.. Thank You !! Link to comment Share on other sites More sharing options...
SlackerAl Posted December 18, 2017 Share Posted December 18, 2017 I'm not sure I can claim divine status for that one, but you are welcome. blazyng 1 Problem solving step 1: Write a simple, self-contained, running, replicator of your problem. Link to comment Share on other sites More sharing options...
blazyng Posted December 18, 2017 Author Share Posted December 18, 2017 opening notepad ist not a problem anymore thanks to u guys but i want to go a step further #RequireAdmin adw () Func adw () Run("C:\adwcleaner_7.0.5.0.exe","" ,"" ,@SW_MAXIMIZE ) WinActivate ( "Malwarebytes AdwCleaner 7" , "" ) ;ControlClick("Malwarebytes AdwCleaner 7","Scan","CLASS:Button; INSTANCE:4" ,"" ,"" ,"","") not configured yet EndFunc this is my code now, but adwcleaner ist not opening as a window. (but the exe is running in task-manager) Link to comment Share on other sites More sharing options...
Floops Posted December 18, 2017 Share Posted December 18, 2017 You passed "" as the third argument which is equal to @SW_HIDE Try this instead: Run("C:\adwcleaner_7.0.5.0.exe","" ,@SW_MAXIMIZE ) blazyng 1 Link to comment Share on other sites More sharing options...
blazyng Posted December 18, 2017 Author Share Posted December 18, 2017 3 minutes ago, Floops said: You passed "" as the third argument which is equal to @SW_HIDE Try this instead: Run("C:\adwcleaner_7.0.5.0.exe","" ,@SW_MAXIMIZE ) This solved my Problem Im sorry i did not used the "Code" box for my comments and that i did not open a new topic :S and behold of that you did answer my Questions anyway thank you all ! 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