Clever1mba Posted June 7, 2005 Share Posted June 7, 2005 helloim 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 More sharing options...
vbMark Posted June 7, 2005 Share Posted June 7, 2005 helloim 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 More sharing options...
w0uter Posted June 7, 2005 Share Posted June 7, 2005 (edited) 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 stringtry For $i = 1 to $service[0] $oShell.ServiceStart($service[$i], true) Next Edited June 7, 2005 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 More sharing options...
Clever1mba Posted June 7, 2005 Author Share Posted June 7, 2005 hello w0uter thanks a lot it works u rock Link to comment Share on other sites More sharing options...
SvenP Posted June 8, 2005 Share Posted June 8, 2005 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 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