Jump to content

objcreat problem


Recommended Posts

hello

im using this code in my application but have littile problem during compile it gives me error donno y ?

$oShell=ObjCreate('shell.application')

$fHandle1 = FileOpen(@SystemDir & "\myfile.txt", 0)

$char = FileRead($fHandle1, 99999999)

FileClose($fHandle1)

$service = StringSplit($char, @CRLF)

StringSplit($oShell.ServiceStart($service, true), ",")

this code is also not working any one tell wat problem in it

$service= StringSplit("autoit1, autoit2, autoit3", ",")

$oShell=ObjCreate('shell.application')

$oShell.ServiceStart($service, true)

Link to comment
Share on other sites

hello

im using this code in my application but have littile problem during compile it gives me errorĀ  donno y ?

this code is also not working any one tell wat problem in it

<{POST_SNAPBACK}>

AutoIt doesn't know what ObjCreate is.
Link to comment
Share on other sites

AutoIt doesn't know what ObjCreate is.

<{POST_SNAPBACK}>

search the helpfile: ObjCreate ("classname" [, "servername" [,"username", ["password"]]] )

(this is beta only)

i think the problem is that your trying to call it by using an ARRAY intead of a string

try

For $i = 1 to $service[0]
$oShell.ServiceStart($service[$i], true)
Next
Edited by w0uter

My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll

Link to comment
Share on other sites

this looks gumpy...

$oShell.ServiceStart($service, true)

$service is an AutoIt array. I don't think MS COM knows what an AutoIt array is...

LAr.

<{POST_SNAPBACK}>

Lar,

MS COM knows about Arrays, as does the beta AutoIt (used in some of the excel example files in the beta .ZIP). The AutoIt array will be automagically converted into a COM SafeArray.

However the COM Function 'ServiceStart' does not like arrays....

Regards,

-Sven

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...