Jump to content

win api error ? o.o


tomashen
 Share

Recommended Posts

  • Moderators

tomashen,

Are you sure you copied all of the example? Is the #include <WINAPI.au3> line in your script? :D

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

  • Moderators

tomashen,

i clicked Open this script...

And when you did and the script opened in SciTE - did the #include <WINAPI.au3> line appear? :D

If it did, do you have WinAPI.au3 in your default include folder (should be C:Program FilesAutoIt3Include if you did a normal install). :oops:

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

  • Developers

Show your script and the Output Pane information when you do F5.

Would help when you have the SciTE4AutoIt3 installer installed as well!

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Moderators

tomashen,

also in scite editor.. it shows up as a blue text that _win_api.... line

That is SciTE syntax highlighting - nothing more. :oops:

Does the same problem occur when you try to open other scripts from the WinAPI include? Or when you manually copy/paste the script into SciTE? :D

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <WINAPI.au3>
    $gui = GUICreate("trans", 300, 400, -1, -1, -1, $WS_EX_LAYERED)
    GUICtrlCreateLabel("This is text on a transparent Layered GUI", 10, 10, 200, 20, -1, $GUI_WS_EX_PARENTDRAG)
    GUICtrlSetTip(-1, "Click label to drag layered window")
    $layButt = GUICtrlCreateButton("Button", 10, 40, 40)
    GUISetBkColor(0xABCDEF)
    _WinAPI_SetLayeredWindowAttributes($gui, 0x010101)
    GUISetState()
    $guicontrol = GUICreate("ControlGUI", 300, 400, 100, 100)
    $checkTrans = GUICtrlCreateCheckbox("Transparent color 0xABCDEF (Checked) Or 0x010101", 10, 10)
    $checkBorder = GUICtrlCreateCheckbox("POPUP-Style", 10, 30)
    GUICtrlCreateLabel("Transparency for Layered GUI", 10, 50)
    $slidTrans = GUICtrlCreateSlider(10, 70, 200, 30)
    GUICtrlSetLimit($slidTrans, 255, 0)
    GUICtrlSetData(-1, 255)
    GUISetState()
While 1
    $extMsg = GUIGetMsg(1)
    $msg = $extMsg[0]
    Switch $extMsg[1]
        Case $guicontrol
            Select
                Case $msg = $GUI_EVENT_CLOSE
                    Exit
                Case $msg = $checkTrans Or $msg = $slidTrans
                    ; Change Attributes of Trans-Color and Window Transparency
                    If BitAND(GUICtrlRead($checkTrans), $GUI_CHECKED) = $GUI_CHECKED Then
                        _WinAPI_SetLayeredWindowAttributes($gui, 0xABCDEF, GUICtrlRead($slidTrans))
                    Else
                        _WinAPI_SetLayeredWindowAttributes($gui, 0x010101, GUICtrlRead($slidTrans))
                    EndIf
                Case $msg = $checkBorder
                    If BitAND(GUICtrlRead($checkBorder), $GUI_CHECKED) = $GUI_CHECKED Then
                        GUISetStyle($WS_POPUP, -1, $gui)
                    Else
                        GUISetStyle($GUI_SS_DEFAULT_GUI, -1, $gui)
                    EndIf
            EndSelect
        Case $gui
            Select
                Case $msg = $layButt
                    Dim $transcolor, $alpha
                    $info = _WinAPI_GetLayeredWindowAttributes($gui,$transcolor, $alpha)
                    MsgBox(0, 'Layered GUI', "Button on layered Window Clicked" & @CRLF & "Information about this window: " & @CRLF & _
                        "Transparent Color: " & $transcolor & @CRLF & _
                        "Alpha Value: " & $alpha & @CRLF & _
                        "LWA_COLORKEY: " & (BitAND($info,$LWA_COLORKEY)=$LWA_COLORKEY) & @CRLF & _
                        "LWA_ALPHA: " & (BitAND($info,$LWA_ALPHA)=$LWA_ALPHA)      )
                Case $msg = $GUI_EVENT_CLOSE
                    Exit MsgBox(0, '', "Close from Layered GUI")
            EndSelect
    EndSwitch
WEnd

nd my up speed is rly slow cnt upload whole installed stuff :[

au3 check errors

C:UsersTomaSzDesktopNew AutoIt v3 Script.au3(55,71) : WARNING: $LWA_COLORKEY: possibly used before declaration.
                        "LWA_COLORKEY: " & (BitAND($info,$LWA_COLORKEY)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:UsersTomaSzDesktopNew AutoIt v3 Script.au3(56,65) : WARNING: $LWA_ALPHA: possibly used before declaration.
                        "LWA_ALPHA: " & (BitAND($info,$LWA_ALPHA)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:UsersTomaSzDesktopNew AutoIt v3 Script.au3(55,71) : ERROR: $LWA_COLORKEY: undeclared global variable.
                        "LWA_COLORKEY: " & (BitAND($info,$LWA_COLORKEY)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:UsersTomaSzDesktopNew AutoIt v3 Script.au3(10,54) : ERROR: _WinAPI_SetLayeredWindowAttributes(): undefined function.
    _WinAPI_SetLayeredWindowAttributes($gui, 0x010101)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:UsersTomaSzDesktopNew AutoIt v3 Script.au3(51,88) : ERROR: _WinAPI_GetLayeredWindowAttributes(): undefined function.
                    $info = _WinAPI_GetLayeredWindowAttributes($gui,$transcolor, $alpha)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:UsersTomaSzDesktopNew AutoIt v3 Script.au3 - 3 error(s), 2 warning(s)

pane

>"C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /prod /in "C:UsersTomaSzDesktopNew AutoIt v3 Script.au3" /autoit3dir "C:Program Files (x86)AutoIt3"
+>17:19:37 Starting AutoIt3Wrapper v.2.0.1.24    Environment(Language:0409  Keyboard:00000809  OS:WIN_7/Service Pack 1  CPU:X64 OS:X64)
>Running AU3Check (1.54.19.0)  from:C:Program Files (x86)AutoIt3
C:UsersTomaSzDesktopNew AutoIt v3 Script.au3(55,71) : WARNING: $LWA_COLORKEY: possibly used before declaration.
                        "LWA_COLORKEY: " & (BitAND($info,$LWA_COLORKEY)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:UsersTomaSzDesktopNew AutoIt v3 Script.au3(56,65) : WARNING: $LWA_ALPHA: possibly used before declaration.
                        "LWA_ALPHA: " & (BitAND($info,$LWA_ALPHA)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:UsersTomaSzDesktopNew AutoIt v3 Script.au3(55,71) : ERROR: $LWA_COLORKEY: undeclared global variable.
                        "LWA_COLORKEY: " & (BitAND($info,$LWA_COLORKEY)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:UsersTomaSzDesktopNew AutoIt v3 Script.au3(10,54) : ERROR: _WinAPI_SetLayeredWindowAttributes(): undefined function.
    _WinAPI_SetLayeredWindowAttributes($gui, 0x010101)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:UsersTomaSzDesktopNew AutoIt v3 Script.au3(51,88) : ERROR: _WinAPI_GetLayeredWindowAttributes(): undefined function.
                    $info = _WinAPI_GetLayeredWindowAttributes($gui,$transcolor, $alpha)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:UsersTomaSzDesktopNew AutoIt v3 Script.au3 - 3 error(s), 2 warning(s)
!>17:19:38 AU3Check ended.rc:2
>Exit code: 0    Time: 31.634
Edited by tomashen

Proud of AutoIt Proud of MySelf :)

Link to comment
Share on other sites

  • Developers

move your cursor to the "#include <WINAPI.au3>" line and hit Alt+I.

Check which file is opened. What is its path and content?

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

So you are telling me that you have a standard installation with both AutoIt3 and SciTE4AutoIt3, a script.au3 file open and your cursor located on the #include line ... and then both ALt+I or Tools/"Open Include" both do not work and do not create a error in the SciTE Outputpane?

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

yea... :D

well if i remember correctly wat i did last time was

downloaded the new scite but i didnt reinstall bcz i didnt want to loose the other stuff that i dled.. u knw.. :oops:

was in include folder and so i replaced all new stuff from install folder to my Autoit3 folder place.

Proud of AutoIt Proud of MySelf :)

Link to comment
Share on other sites

  • Developers

ok, well ... I do not know, but what I do know is that when you use the proper installers this will work.

If you feel you are knowledgeable enough to do this manually, then be my guest but you are out on your own.

JOs

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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...