Jump to content

Error in GUIcreate code.


lolp1
 Share

Recommended Posts

Hello, this code seems to give me an error:

$XSkinGui = XSkinGUICreate( "First menu", 320, 190, $Skin_Folder)(@DesktopWidth-500)/2, (@DesktopHeight-400)/2 , $WS_OVERLAPPED+$WS_CAPTION+$WS_SYSMENU+$WS_MINIMIZEBOX+$WS_VISIBLE+$WS_CLIPSIBLINGS)

Now, yes the skin folder is there. The error I am getting is:

Error: Illeal text at the end of a statment (one statment per line) I'm sure I am just havin a brain loss moment, but does anyone wan't to help me :whistle:?

Link to comment
Share on other sites

  • Moderators

Hello, this code seems to give me an error:

$XSkinGui = XSkinGUICreate( "First menu", 320, 190, $Skin_Folder)(@DesktopWidth-500)/2, (@DesktopHeight-400)/2 , $WS_OVERLAPPED+$WS_CAPTION+$WS_SYSMENU+$WS_MINIMIZEBOX+$WS_VISIBLE+$WS_CLIPSIBLINGS)

Now, yes the skin folder is there. The error I am getting is:

Error: Illeal text at the end of a statment (one statment per line) I'm sure I am just havin a brain loss moment, but does anyone wan't to help me :whistle:?

$XSkinGui = XSkinGUICreate( "First menu", 320, 190, $Skin_Folder)(@DesktopWidth-500)/2, (@DesktopHeight-400)/2 , $WS_OVERLAPPED+$WS_CAPTION+$WS_SYSMENU+$WS_MINIMIZEBOX+$WS_VISIBLE+$WS_CLIPSIBLINGS)

It was your mistake.

$XSkinGui = XSkinGUICreate( "First menu", 320, 190, $Skin_Folder,(@DesktopWidth-500)/2, (@DesktopHeight-400)/2 , $WS_OVERLAPPED+$WS_CAPTION+$WS_SYSMENU+$WS_MINIMIZEBOX+$WS_VISIBLE+$WS_CLIPSIBLINGS)

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

you are not using the parameters as noted/required for XSkinGUICreate()

#include <XSkin.au3>

; the two following folders are seperate for building skins
; however in YOUR program put them in the same folder
; folder of skin
$Skin_Folder = @ScriptDir & "\Skins\blackhole"
; icon folder
$Icon_Folder = @ScriptDir & "\Skins\Default"


$XSkinGui = XSkinGUICreate( "First menu", 320, 190, $Skin_Folder);,(@DesktopWidth-500)/2, (@DesktopHeight-400)/2 , $WS_OVERLAPPED+$WS_CAPTION+$WS_SYSMENU+$WS_MINIMIZEBOX+$WS_VISIBLE+$WS_CLIPSIBLINGS)

$XIcon = XSkinIcon($XSkinGui, 2)


GUISetState()


While 1
    $msg = GUIGetMsg()
   
    If $msg = $XIcon[1] Then Exit
    If $msg = $XIcon[2] Then GUISetState(@SW_MINIMIZE)
   
WEnd

8)

NEWHeader1.png

Link to comment
Share on other sites

to move the window use this

#include <XSkin.au3>

; the two following folders are seperate for building skins
; however in YOUR program put them in the same folder
; folder of skin
$Skin_Folder = @ScriptDir & "\Skins\blackhole"
; icon folder
$Icon_Folder = @ScriptDir & "\Skins\Default"


$XSkinGui = XSkinGUICreate( "First menu", 320, 190, $Skin_Folder);,(@DesktopWidth-500)/2, (@DesktopHeight-400)/2 , $WS_OVERLAPPED+$WS_CAPTION+$WS_SYSMENU+$WS_MINIMIZEBOX+$WS_VISIBLE+$WS_CLIPSIBLINGS)

$XIcon = XSkinIcon($XSkinGui, 2)

WinMove( $XSkinGui, "", (@DesktopWidth-500)/2, (@DesktopHeight-400)/2)  

GUISetState()


While 1
    $msg = GUIGetMsg()
   
    If $msg = $XIcon[1] Then Exit
    If $msg = $XIcon[2] Then GUISetState(@SW_MINIMIZE)
   
WEnd

8)

NEWHeader1.png

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