Naumishe Posted October 28, 2016 Posted October 28, 2016 Hi all! After reinstall OS - Windows 10 Home get some new problem for me with AutoIT. There is 1 little script test.au3- Quote #include <MsgBoxConstants.au3> MsgBox($MB_SYSTEMMODAL, "Title", $cmdline[0], 10) If I run it from CMD or powershell by command - test.au3 12312312312 I get "0" instead of "1". So I think that something in my new OS prevents to transfer parameters into script. Someone knows what happened?
water Posted October 28, 2016 Posted October 28, 2016 When I use "C:\Program Files (x86)\AutoIt3\autoit3.exe" C:\temp\test_CMD.au3 123 it works just fine. You are sure that the file type association of au3 is correct? My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
Naumishe Posted October 28, 2016 Author Posted October 28, 2016 Off course, I receive window from Auto IT with title - "Title" and variable $cmdline[0] that just 0 instead of 1. P.S. On other computer it all work fine.
Naumishe Posted October 28, 2016 Author Posted October 28, 2016 Sorry, if I type in cmd "c:\Program Files (x86)\AutoIt3\AutoIt3.exe" test.au3 123 it is show me 1 test.au3 123 it is show me 0 WTF?
water Posted October 28, 2016 Posted October 28, 2016 Is there another test.au3 in another directory that gets executed by Windows? My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
Naumishe Posted October 28, 2016 Author Posted October 28, 2016 No. It is my script - show Msgbox with title "Title" and in windows - text $cmdline[0] that show how many parameters was send to script. If I just launch script something prevents transferring parameters and it is show 0
water Posted October 28, 2016 Posted October 28, 2016 What do you get if you run #include <MsgBoxConstants.au3> MsgBox($MB_SYSTEMMODAL, "Title", ">>" & $CmdLineRaw & "<<", 10) My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
Naumishe Posted October 28, 2016 Author Posted October 28, 2016 --------------------------- Title --------------------------- >>"C:\Users\Naum\Desktop\test2\test3.au3"<< --------------------------- ОК ---------------------------
water Posted October 29, 2016 Posted October 29, 2016 When you double click your script in Windows Explorer does it get executed or does this start SciTE for editing the script source? My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
Naumishe Posted October 30, 2016 Author Posted October 30, 2016 Double click ot script execute it and I see Msgbox Window (with 0 or last message).
PACaleala Posted November 1, 2016 Posted November 1, 2016 @Naumishe $cmdline[0] is just a counter . Re-read AutoIt help file about "Running Scripts - Command Line Parameters"
water Posted November 1, 2016 Posted November 1, 2016 True. But even the counter should return a value > 0 when parameters are passed to the script. It seems that the way the OP calls the script parameters aren't accepted. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
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