neotrio Posted July 17, 2006 Share Posted July 17, 2006 Hi all, Im trying obj/com reference functions but im getting error unknown function,e.g.:- ObjCreate(),ObjEvent() etc.Im just running the example script given in autoit(beta) help. Do I need any specific file to include. Also,my whole intention is to read data from excel sheet to word document and vice-versa through autoit. If anybody knows the solution please reply. Reply asap. ciao. Link to comment Share on other sites More sharing options...
Xenobiologist Posted July 17, 2006 Share Posted July 17, 2006 (edited) HI, you have to beta run or toggle to beta. In S&S forum there is a excel_UDF which might be quite useful for you. For testing whether you started your script in beta mode, put this at first in your script. If @AutoItVersion > "3.1.1.0" Then MsgBox(64, "Info", "Script " & @ScriptName & " started in BETA mode!" & @CRLF & "Version : " & @AutoItVersion) ElseIf @AutoItVersion = "3.1.1.0" Then MsgBox(64, "Info", "Script " & @ScriptName & " started in normal mode!" & @CRLF & "Version : " & @AutoItVersion) EndIf So long, Mega Edited July 17, 2006 by th.meger Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
GaryFrost Posted July 17, 2006 Share Posted July 17, 2006 Need to make sure your running it in Beta if you don't have it a good tool to use is SciTE (see my sig for link) With-in site Alt+F5 to run using beta or Tools/Beta Run Gary SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
neotrio Posted July 17, 2006 Author Share Posted July 17, 2006 hi th.meger, Its not working ! HI, you have to beta run or toggle to beta. In S&S forum there is a excel_UDF which might be quite useful for you. For testing whether you started your script in beta mode, put this at first in your script. If @AutoItVersion > "3.1.1.0" Then MsgBox(64, "Info", "Script " & @ScriptName & " started in BETA mode!" & @CRLF & "Version : " & @AutoItVersion) ElseIf @AutoItVersion = "3.1.1.0" Then MsgBox(64, "Info", "Script " & @ScriptName & " started in normal mode!" & @CRLF & "Version : " & @AutoItVersion) EndIf So long, Mega Link to comment Share on other sites More sharing options...
GaryFrost Posted July 17, 2006 Share Posted July 17, 2006 hi th.meger, Its not working !Might help to specify what is not working. SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
neotrio Posted July 17, 2006 Author Share Posted July 17, 2006 Might help to specify what is not working.Im runninng it in beta mode, but its not working. Link to comment Share on other sites More sharing options...
GaryFrost Posted July 17, 2006 Share Posted July 17, 2006 Im runninng it in beta mode, but its not working.hard to help with-out a script to look at and exact errors SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
Xenobiologist Posted July 17, 2006 Share Posted July 17, 2006 HI, I love these posts. DOESN'T WORK!!! Please you us the whole script you tried and if possible show the error message. Use Scite as editor if you aren't used to another one. So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
neotrio Posted July 17, 2006 Author Share Posted July 17, 2006 hard to help with-out a script to look at and exact errorsscript as follows :-; Example 1;; Counting the number of open shell windows$oShell = ObjCreate("shell.application") ; Get the Windows Shell Object$oShellWindows=$oShell.windows ; Get the collection of open shell Windowsif Isobj($oShellWindows) then $string="" ; String for displaying purposes for $Window in $oShellWindows ; Count all existing shell windows $String = $String & $window.LocationName & @CRLF next Msgbox(0,"Shell Windows","You have the following shell windows:" & @CRLF & @CRLF & $String);endifexit Link to comment Share on other sites More sharing options...
GaryFrost Posted July 17, 2006 Share Posted July 17, 2006 script as follows :-; Example 1;; Counting the number of open shell windows$oShell = ObjCreate("shell.application") ; Get the Windows Shell Object$oShellWindows=$oShell.windows ; Get the collection of open shell Windowsif Isobj($oShellWindows) then $string="" ; String for displaying purposes for $Window in $oShellWindows ; Count all existing shell windows $String = $String & $window.LocationName & @CRLF next Msgbox(0,"Shell Windows","You have the following shell windows:" & @CRLF & @CRLF & $String);endifexitWorks for me with no problems. SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
neotrio Posted July 17, 2006 Author Share Posted July 17, 2006 script as follows :-; Example 1;; Counting the number of open shell windows$oShell = ObjCreate("shell.application") ; Get the Windows Shell Object$oShellWindows=$oShell.windows ; Get the collection of open shell Windowsif Isobj($oShellWindows) then $string="" ; String for displaying purposes for $Window in $oShellWindows ; Count all existing shell windows $String = $String & $window.LocationName & @CRLF next Msgbox(0,"Shell Windows","You have the following shell windows:" & @CRLF & @CRLF & $String);endifexitthe error :\ObjCreate.au3 (11) : ==> Unknown function name.: $oShell = ObjCreate("shell.application") ; Get the Windows Shell Object $oShell = ^ ERROR Link to comment Share on other sites More sharing options...
GaryFrost Posted July 17, 2006 Share Posted July 17, 2006 the error :\ObjCreate.au3 (11) : ==> Unknown function name.: $oShell = ObjCreate("shell.application") ; Get the Windows Shell Object $oShell = ^ ERRORI would suggest downloading SciTE if you haven't already and run the script using Alt+F5 or Tools/Beta Run and see if you have the same problem.The above error tells me your not running it in beta. SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
neotrio Posted July 17, 2006 Author Share Posted July 17, 2006 I would suggest downloading SciTE if you haven't already and run the script using Alt+F5 or Tools/Beta Run and see if you have the same problem.The above error tells me your not running it in beta.ERROR :C:\Program Files\AutoIt3\beta\Examples\Helpfile\O.au3 (5) : ==> Unknown function name.: $oShell = ObjCreate("shell.application") ; Get the Windows Shell Object $oShell = ^ ERRORIm running it in beta. .........Why im getting this error? Link to comment Share on other sites More sharing options...
GaryFrost Posted July 17, 2006 Share Posted July 17, 2006 (edited) ; Example 1 ; ; Counting the number of open shell windows If @AutoItVersion > "3.1.1.0" Then MsgBox(64, "Info", "Script " & @ScriptName & " started in BETA mode!" & @CRLF & "Version : " & @AutoItVersion) Else MsgBox(64, "Info", "Script " & @ScriptName & " started in normal mode! GOODBYE!!!!" & @CRLF & "Version : " & @AutoItVersion) Exit EndIf $oShell = ObjCreate("shell.application") ; Get the Windows Shell Object $oShellWindows = $oShell.windows ; Get the collection of open shell Windows If IsObj($oShellWindows) Then $string = "" ; String for displaying purposes For $Window In $oShellWindows ; Count all existing shell windows $string = $string & $window.LocationName & @CRLF Next MsgBox(0, "Shell Windows", "You have the following shell windows:" & @CRLF & @CRLF & $string); EndIf Exit Edited July 17, 2006 by gafrost SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
neotrio Posted July 17, 2006 Author Share Posted July 17, 2006 ; Example 1 ; ; Counting the number of open shell windows If @AutoItVersion > "3.1.1.0" Then MsgBox(64, "Info", "Script " & @ScriptName & " started in BETA mode!" & @CRLF & "Version : " & @AutoItVersion) Else MsgBox(64, "Info", "Script " & @ScriptName & " started in normal mode! GOODBYE!!!!" & @CRLF & "Version : " & @AutoItVersion) Exit EndIf $oShell = ObjCreate("shell.application") ; Get the Windows Shell Object $oShellWindows = $oShell.windows ; Get the collection of open shell Windows If IsObj($oShellWindows) Then $string = "" ; String for displaying purposes For $Window In $oShellWindows ; Count all existing shell windows $string = $string & $window.LocationName & @CRLF Next MsgBox(0, "Shell Windows", "You have the following shell windows:" & @CRLF & @CRLF & $string); EndIf Exit throwing the Same Error : Link to comment Share on other sites More sharing options...
GaryFrost Posted July 17, 2006 Share Posted July 17, 2006 throwing the Same Error :What OS are you using? SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
neotrio Posted July 17, 2006 Author Share Posted July 17, 2006 What OS are you using?windows XP Professional Link to comment Share on other sites More sharing options...
GaryFrost Posted July 17, 2006 Share Posted July 17, 2006 windows XP Professionalwhen run in release i get the same error as you, apparently running in release doesn't even get to version check$oShell = ObjCreate("shell.application") ; Get the Windows Shell Object $oShell = ^ ERRORSo for the last time, are you sure your running it in beta? do you get the message box that says your running it in beta? SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
Xenobiologist Posted July 17, 2006 Share Posted July 17, 2006 Hi, you are so patient Gary. I looks like BIG sorry at the end of this funny thread. So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
neotrio Posted July 17, 2006 Author Share Posted July 17, 2006 when run in release i get the same error as you, apparently running in release doesn't even get to version checkSo for the last time, are you sure your running it in beta? do you get the message box that says your running it in beta?Im doing following step while running the code ; alt +f7 --for compile(beta)alt +f5---for run(beta)but im not getting any message box saying you are running in beta. 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