Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

#include <GuiListBox.au3> - error: Error opening the File


  • Please log in to reply
3 replies to this topic

#1 CmputrAce

CmputrAce

    Seeker

  • New Members
  • 3 posts

Posted 24 June 2009 - 10:01 PM

I pulled this from the help file to test the ListBox

AutoIt         
#AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 #include <GuiListBox.au3> $Debug_LB = False ; Check ClassName being passed to ListBox functions, set to True and use a handle to another control to see it work _Main() Func _Main()     Local $hListBox     ; Create GUI     GUICreate("List Box Click Item_GUICtrlListBox_ClickItem", 400, 296)     $hListBox = GUICtrlCreateList("", 2, 2, 396, 296)     GUISetState()     ; Add strings     _GUICtrlListBox_BeginUpdate($hListBox)     For $iI = 1 To 9         _GUICtrlListBox_AddString($hListBox, StringFormat("%03d : Random string", Random(1, 100, 1)))     Next     _GUICtrlListBox_EndUpdate($hListBox)     ; Click an item     _GUICtrlListBox_ClickItem($hListBox, 4, "left", True)     ; Loop until user exits     Do     Until GUIGetMsg() = $GUI_EVENT_CLOSE     GUIDelete() EndFunc   ;==>_Main


I get this message:

Line 2 (File "C:\Devel\WinScript\AutoIt\test.au3")

#include <GuiListBox.au3>

Error: Error opening the file

If I try to "Execute" GuiListBox.au3, I get:

Line 1055 (File "C:P\Program Files\AutoIt3\Include\WinAPI.au3")

Func _WinAPI_CreateFont($nHeight, $nWidth, $nEscape = 0, $nOrientn = 0, $fnWeight = $__WINAPCONSTANT_FW_NORMAL, $bItalic = False, $bUnderline = False, $bStrikeout = False, $nCharset = $__WINAPCONSTANT_DEFAULT_CHARSET, $nOutputPrec = $__WINAPCONSTANT_OUT_DEFAULT_PRECIS, $nClipPrec = $__WINAPCONSTANT_CLIP_DEFAULT_PRECIS, $nQuality = $__WINAPCONSTANT_DEFAULT_QUALITY, $nPitch = 0, $szFace = 'Arial')

Error:Badly formatted "Func" statement.

Any thoughts?







#2 Zedna

Zedna

    AutoIt rulez!

  • MVPs
  • 8,768 posts

Posted 24 June 2009 - 10:07 PM

(File "C:P\Program Files\AutoIt3\Include\WinAPI.au3")




There is bad path C:P\Program Files\...

#3 CmputrAce

CmputrAce

    Seeker

  • New Members
  • 3 posts

Posted 24 June 2009 - 10:16 PM

There is bad path C:P\Program Files\...

That was a typo: The error message is:

Line 1055 (File "C:\Program Files\AutoIt3\Include\WinAPI.au3")

Func _WinAPI_CreateFont($nHeight, $nWidth, $nEscape = 0, $nOrientn = 0, $fnWeight = $__WINAPCONSTANT_FW_NORMAL, $bItalic = False, $bUnderline = False, $bStrikeout = False, $nCharset = $__WINAPCONSTANT_DEFAULT_CHARSET, $nOutputPrec = $__WINAPCONSTANT_OUT_DEFAULT_PRECIS, $nClipPrec = $__WINAPCONSTANT_CLIP_DEFAULT_PRECIS, $nQuality = $__WINAPCONSTANT_DEFAULT_QUALITY, $nPitch = 0, $szFace = 'Arial')

Error:Badly formatted "Func" statement.



#4 CmputrAce

CmputrAce

    Seeker

  • New Members
  • 3 posts

Posted 24 June 2009 - 10:30 PM

Not sure why it happened, but I uninstalled AutoIt and reinstalled it. Case closed.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users