Jump to content

Search the Community

Showing results for tags 'ObjCreate'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 8 results

  1. Hi all, I'm trying to write a script that connects with a VBA/COM API to get the status of a connected phone. I've been looking up and down this forum for tips or other user's experiences, but I can't seem to find anything (even remotely) similar. It shouldn't be so hard to do, however. Software I'm trying to connect to I'm trying to integrate CallCenter by using their API, which is documented over here : JustRemotePhone API Reference Things I've tried I've tried using ObjCreate but I don't get any result, it always returns the same (negative) error. #Version 1 tried ObjCreate("JustRemotePhone.RemotePhoneService") #Version 2 tried ObjCreate("JustRemotePhoneCOM.RemotePhoneService") #Version 3 tried ObjCreate("JustRemotePhoneCOM.RemotePhoneService.Application") None of the three versions I tried seem to deliver any result other than a negative error value which basically says that the given class is not valid. I am starting to get the hang of AutoIt by now, but unmanaged programming languages and object-oriented stuff is still quite a grey zone for me. If anyone could help me 'talk' to this application, I'd be immensely grateful! Thanks in advance and kind regards from Belgium! Jan
  2. I would love to have some help or guidance I am able to Query from my database but I am not able to Update or insert etc because I lack the knowledge for it this is my code for to retrieve some data from and works perfect Dim $ueberschriften = "" Dim $anzahl = 0 Dim $dsncount = 1 Global $DSN = "MTXXV5" Global $Query = "Select * from VIEWS" Func SSSQL($SSQuery) ;SuperSonicSQL     ConsoleWrite($SSQuery & @LF)     $cmboVal = ""     $adoCon = ObjCreate("ADODB.Connection")     $adoCon.Open($DSN)     $adoRs = ObjCreate("ADODB.Recordset")     $adoSQL = $SSQuery     $adoRs.CursorType = 2     $adoRs.LockType = 3     $adoRs.Open($adoSQL, $adoCon)     With $adoRs         Global $QueryAnswer = .GetRows     EndWith     Return $QueryAnswer EndFunc   ;==>SSSQL and this is my failed attempt, The Query is correct but I want to able to use it in autoit instead of have to manual update or insert into flamerobin $SS_SQL_Insert_or_Update = "INSERT INTO DETECTION (DNAME,DTYPE,WINNAME,AREA,COLOR,MOUSE) VALUES ('PopUpTradeInviteYes        s                    ','SEARCH','XXX','175,240,550,240,65,228,82,234','5062478','0') " Func SSSQLIU($SS_SQL_Insert_or_Update) ;SuperSonicSQL :P     $cmboVal = ""     $adoCon = ObjCreate("ADODB.Connection")     $adoCon.Open($DSN)     $adoRs = ObjCreate("ADODB.Record")     $adoSQL =$SS_SQL_Insert_or_Update ;~     $adoRs.CursorType = 2     $adoRs.LockType = 4     $adoRs.Open($adoSQL, $adoCon) ;~     With $adoRs ;~         Global $QueryAnswer = .GetRows ;~     EndWith ;~     Return $QueryAnswer EndFunc   ;==>SSSQL I am at a total loss and I am just trying this at random but I am also going to sleep now I would love to have some minor examples "C:\_CC_V10_DetectionTAB.au3" (174) : ==> The requested action with this object has failed.: $adoRs.Open($adoSQL, $adoCon) $adoRs^ ERROR
  3. Local $sAxName Local $oMSComm $sAxName = "MSCOMMLib.MSComm.1" $oMSComm = ObjCreate($sAxName) MsgBox(0, Default, StringFormat("Name: %s, Obj %d, Err %d", $sAxName, IsObj($oMSComm), @error)) I'm talking to serial ports (for Arduino) using the MSComm object. It all runs fine from SciTE or .exe. If I compile to .a3x the object is not created. I could manage without .a3x but I like it because it compiles faster.
  4. ...or maybe with the way it now communicates with CDO.DropDirectory. We have a script that monitors e-mails that come in to a drop directory. The script looks at the e-mails and sends a response accordingly to the user that sent the e-mail. However, after updating to the latest AutoIt, I cannot compile due to a supposed syntax error which does not exist. Here is the relevant code: $objDropDirectory = ObjCreate("CDO.DropDirectory") $colMessageCollection = $objDropDirectory.GetMessages($DropFolder) If $colMessageCollection.Count > 0 Then For $msg In $colMessageCollection $fileFullPath = $colMessageCollection.Filename($msg) If StringInStr($msg.To, "daily", 2) Then ...do stuff... EndIf Next EndIfThe error I receive upon compiling is this: (36,26) : ERROR: missing separator character after keyword. If StringInStr($msg.To, Clearly, there is a separator character. The comma is right there. This wasn't happening before 3.3.8.x. Any ideas?
  5. I have a test file that creates an Excel.Application object, and it works OK when I run it with F5, but when I compile it and run the executble, the operation fails. Here is my code: Opt('MustDeclareVars', 1) Global $oMyError, $oExcel _Main() Exit (1) Func _Main() Local $str $oMyError = ObjEvent("AutoIt.Error", "MyErrFunc") ; Initialize a COM error handler If IsObj($oMyError) Then $oExcel = ObjCreate("Excel.Application") If IsObj($oExcel) Then $str = "Created the Excel.Application object OK" Else $str = "ObjCreate() FAILED!" EndIf Else $str = "ObjEvent() FAILED!" EndIf MsgBox(0, "results", $str) EndFunc ;==>_Main Func MyErrFunc() Local $str $str = "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 ClipPut($str) MsgBox(0, "AutoItCOM Test", $str & @CRLF & "(results are in the clipboard)") Exit (1) EndFunc ;==>MyErrFunc Here is the error info: We intercepted a COM Error ! err.description is: err.windescription: Not enough storage is available to complete this operation. err.number is: 8007000E err.lastdllerror is: 0 err.scriptline is: -1 err.source is: err.helpfile is: err.helpcontext is:
  6. Hi All, Now before I start, I have trawled through the forum & elsewhere for the last 24 hours or so & found nothing to even point me in the right direction. I have a rather large script that's doing various (AD reads & applying RegWrites based on the SID & AD reads....) & I've stripped it all back & the problem appears to lie with the create object which is calling a sproc I wrote to pull back various based on params passed. Now for the actual issue, all worked fine first time everywhere apart from within a Citrix xenapp session which is when I'm getting hit with the Exception Occured Script Line -1 - Variable must be of type 'Object'. Here is a stripped back portion which I've been testing with against xenapp (with a MsgBox added to easily see if anything did return), can anyone notice anything glaringly stupid that I'm doing? Global $AppError = ObjEvent("AutoIt.Error","ErrFunc") $Emp=@UserName $adDSN="Driver={SQL Server};Server=*****;Database=*****;Uid=****;Pwd=*****" $adCN = ObjCreate ("ADODB.Connection") $adCN.Open ($adDSN) $FNsQuery = "exec [ooo_sp_ad_user] @user="&$Emp&",@type=1" $FNresult = $adCN.Execute($FNsQuery) $ADFirstName=$FNresult.Fields("").Value MsgBox(0, "AD Test", $ADFirstName) $adCN.Close Func ErrFunc() Local $HexNumber Local $strMsg $HexNumber = Hex($AppError.Number, 8) $strMsg = "Error Number: " & $HexNumber & @CRLF $strMsg &= "WinDescription: " & $AppError.WinDescription & @CRLF $strMsg &= "Script Line: " & $AppError.ScriptLine & @CRLF MsgBox(0, "ERROR", $strMsg) SetError(1) Endfunc Any pointers at all would be greatly appreciated. Thanks Bob
  7. I'm using irrlight to display 3D models in a window but I can't create any controls in this window and I thought I could compile the code and use objcreate () to display the irrlight (3D) part and overlay it with the autoit gui controls if it won't work is there a way to add gui controls on to the window created by the .dll?
  8. I have used the following code to open and close an excel file after working in it, but after the file is closed I checked the task manager it shows EXCEL.EXE * 32 in the process tab. Is there a way to remove this from task manager also when I close my excel workbook ? Thanks ; Open the already existing Excel File #include <Excel.au3> $oExcel = ObjCreate("Excel.Application") Local $sFilePath1 = @ScriptDir & "\Excel File.xlsm" ;This file should already exist Local $oExcel = _ExcelBookOpen($sFilePath1) ;Opening the file $oExcel.application.quit ;Closing the Excel Application
×
×
  • Create New...