sanulevan Posted December 12, 2011 Posted December 12, 2011 Hi,i install the software NXPowerlite in my C:\Program Files (x86)\NXPowerLite folder,please give a sample code for running this software without using run,winwaitactive ,etc(using com obj).
water Posted December 12, 2011 Posted December 12, 2011 It doesn't work this way here. You post the script you have so far plus a question where you need assistance. 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
sanulevan Posted December 12, 2011 Author Posted December 12, 2011 $oNxp=ObjCreate("NXPowerlite.application")$0NxpEvent=ObjEvent($oNxp,"NXPowerlite_")$oError = ObjEvent("AutoIt.Error","MyErrFunc")If Not $oNxp.Client.IsRunning Then$oNxp.Client.Start()EndIfFunc MyErrFunc()EndFuncthis is the code i usedplease give a code for running NXP
water Posted December 12, 2011 Posted December 12, 2011 But doesn't the code you posted run NXP? 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
water Posted December 12, 2011 Posted December 12, 2011 OK, I try to rephrase my question: What does the code you posted do? 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
sanulevan Posted December 12, 2011 Author Posted December 12, 2011 ,There is anyway to run an installed software without using RUN
water Posted December 12, 2011 Posted December 12, 2011 (edited) I think the code you posted runs the software. You have an error handler in your code which doesn't do anything so you don't get informed about problems. Please try this code and post the result:$oNxp = ObjCreate("NXPowerlite.application") $0NxpEvent = ObjEvent($oNxp, "NXPowerlite_") $oMyError = ObjEvent("AutoIt.Error", "MyErrFunc") If Not $oNxp.Client.IsRunning Then $oNxp.Client.Start() EndIf Func MyErrFunc() MsgBox(0, "AutoItCOM Test", "We intercepted a COM Error !" & @CRLF & @CRLF & _ "err.description is: " & @TAB & $oMyError.description & @CRLF & _ "err.windescription:" & @TAB & $oMyError.windescription & @CRLF & _ "err.number is: " & @TAB & Hex($oMyError.number, 8) & @CRLF & _ "err.lastdllerror is: " & @TAB & $oMyError.lastdllerror & @CRLF & _ "err.scriptline is: " & @TAB & $oMyError.scriptline & @CRLF & _ "err.source is: " & @TAB & $oMyError.source & @CRLF & _ "err.helpfile is: " & @TAB & $oMyError.helpfile & @CRLF & _ "err.helpcontext is: " & @TAB & $oMyError.helpcontext _ ) EndFunc ;==>MyErrFunc Edited December 12, 2011 by water 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
sanulevan Posted December 12, 2011 Author Posted December 12, 2011 C:xampphtdocsautoitforumNXP.au3(1,1) : ERROR: syntax error[^
water Posted December 12, 2011 Posted December 12, 2011 Fixed. 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
sanulevan Posted December 12, 2011 Author Posted December 12, 2011 (edited) shows an error in message box WE intercepted a COM ERROR! err.description is: err.windescription: Variable must be of type 'Object'. err.number is: 000000A9 err.lastdllerror is: 0 err.scriptline is: 23 err.source is: err.helpfile is: err.helpcontext is: Edited December 12, 2011 by sanulevan
water Posted December 12, 2011 Posted December 12, 2011 err.scriptline is: 23means that you do not run the script I provided above (only has 18 lines). This makes debugging nearly impossible Can you post the script you use for testing or use my script to test? 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
sanulevan Posted December 12, 2011 Author Posted December 12, 2011 i used the script you provideshows an error in message box WE intercepted a COM ERROR! err.description is: err.windescription: Variable must be of type 'Object'. err.number is: 000000A9 err.lastdllerror is: 0 err.scriptline is: 4 err.source is: err.helpfile is: err.helpcontext is:
water Posted December 12, 2011 Posted December 12, 2011 What do you get if you move the COM error handler to the top of the script? $oMyError = ObjEvent("AutoIt.Error", "MyErrFunc") $oNxp = ObjCreate("NXPowerlite.application") $oNxpEvent = ObjEvent($oNxp, "NXPowerlite_") If Not $oNxp.Client.IsRunning Then $oNxp.Client.Start() EndIf Func MyErrFunc() MsgBox(0, "AutoItCOM Test", "We intercepted a COM Error !" & @CRLF & @CRLF & _ "err.description is: " & @TAB & $oMyError.description & @CRLF & _ "err.windescription:" & @TAB & $oMyError.windescription & @CRLF & _ "err.number is: " & @TAB & Hex($oMyError.number, 8) & @CRLF & _ "err.lastdllerror is: " & @TAB & $oMyError.lastdllerror & @CRLF & _ "err.scriptline is: " & @TAB & $oMyError.scriptline & @CRLF & _ "err.source is: " & @TAB & $oMyError.source & @CRLF & _ "err.helpfile is: " & @TAB & $oMyError.helpfile & @CRLF & _ "err.helpcontext is: " & @TAB & $oMyError.helpcontext _ ) EndFunc ;==>MyErrFunc 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
sanulevan Posted December 12, 2011 Author Posted December 12, 2011 Shows an error in messagebox AUTOitComtestWE intercepted a COM error! err.description is:err.windescription: Invalid class stringerr.number is:800401F3err.lastdllerror is:1008err.scriptline is:2err.source is:err.helpfile is:err.helpcontext is:
water Posted December 12, 2011 Posted December 12, 2011 That's the same error message I get on my machine - but here NXPowerLite isn't installed. That leads me to the assumption that either there is a problem with your installation or NXPowerLite doesn't provide a COM interface (hence the name "Lite"?). Can you re-install or make sure that NXPowerLite provides a COM interface? 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
sanulevan Posted December 12, 2011 Author Posted December 12, 2011 How can i know whether a software provides COM interface?
water Posted December 12, 2011 Posted December 12, 2011 Usually it's mentioned in the software docu. Where did you find the statements you used in your original script (If Not $oNxp.Client.IsRunning Then etc.)? 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
sanulevan Posted December 12, 2011 Author Posted December 12, 2011 (edited) Thankyou Water......I am fairly new to autoit,i download the code for skype automation and modify it for NXP .i don't know any about COM ,i try it first time for NXP..How can i know whether a software provides COM interface? and its objects from its documents Edited December 12, 2011 by sanulevan
JohnOne Posted December 12, 2011 Posted December 12, 2011 http://www.neuxpower.com/releases/fileserver/4.3.5/NXPowerLite%20File%20Server%20Manual.pdfthis does not mention any com interface. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
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