Jump to content

Recommended Posts

Posted

Hello all, I have found xskin and it is pretty cool. One issue I am having though is getting the Minimize and Close icons to appear. All I get when I add them are white squares (I reduced my code to show only the close one)

Here is my code, if anyone can tell me why they are not appearing:

#include <XSkin.au3>

$Skin_Folder = @ScriptDir & "\Skins\BlackJack" ; Folder of skin
$XSkinGui = XSkinGUICreate("Allocated Length Calculator", 400, 225, $Skin_Folder) ; Creates an XSkin dialog box
$XIcon = XSkinIcon($XSkinGui, 1) ; Adds the window close button
$button_1 = XSkinButton("Formula Criteria", 275, 150, 100, 35, "FormulaCriteria") ; Adds the Formula Criteria button
$sFinish = "Enter finished part length" & @CRLF & "NOTE: Part should have a diameter "

Local $idRadio1 = GUICtrlCreateRadio("Less than 4in diameter and less than 2in long", 20, 45, 250, 20)
Local $idRadio2 = GUICtrlCreateRadio("Less than 4in diameter and greater than 2in long", 20, 65, 250, 20)
Local $idRadio3 = GUICtrlCreateRadio("Between 4in to 12in diameter and less than 2in long", 20, 85, 275, 20)
Local $idRadio4 = GUICtrlCreateRadio("Between 4in to 12in diameter and greater 2in long", 20, 105, 250, 20)
Local $idRadio5 = GUICtrlCreateRadio("Greater than 12in diameter", 20, 125, 250, 20)

GUISetState(@SW_SHOW)

RadioRequest()

Func RadioRequest()

    While 1
        MouseOver() ; Makes the buttons flash on mouseover
        Sleep(10)

        $idMsg = GUIGetMsg()

        Select
            Case $idMsg = $XIcon[1]
                Exit
            Case $idMsg = $idRadio1
                $sAnswer = XSkinInputBox("Finished Length", $sFinish & "less than 4"" and finished length less than 2""") ; Places the input box
                XSkinMsgBoxOK("Allocated Length", "For a part with a diameter less than 4"" and a finished length of " & $sAnswer & _
                        """ the allocated length is " & Round(144 / Floor(142 / ($sAnswer + 0.125 + 0.08)), 4) & """") ; Display the result.
                Exit
            Case $idMsg = $idRadio2
                $sAnswer = XSkinInputBox("Finished Length", $sFinish & "less than 4"" and finished length greater than 2""") ; Places the input box
                XSkinMsgBoxOK("Allocated Length", "For a part with a diameter less than 4"" and a finished length of " & $sAnswer & _
                        """ the allocated length is " & Round(144 / Floor(144 / ($sAnswer + 0.125 + 0.08)), 4) & """") ; Display the result.
                Exit
            Case $idMsg = $idRadio3
                $sAnswer = XSkinInputBox("Finished Length", $sFinish & "between 4"" and 12"" and finished length less than 2""") ; Places the input box
                XSkinMsgBoxOK("Allocated Length", "For a part with a diameter between 4"" and 12"" and a finished length of " & $sAnswer & _
                        """ the allocated length is " & Round(144 / Floor(142 / ($sAnswer + 0.25 + 0.08)), 4) & """") ; Display the result.
                Exit
            Case $idMsg = $idRadio4
                $sAnswer = XSkinInputBox("Finished Length", $sFinish & "between 4"" and 12"" and finished length greater than 2""") ; Places the input box
                XSkinMsgBoxOK("Allocated Length", "For a part with a diameter between 4"" and 12"" and a finished length of " & $sAnswer & _
                        """ the allocated length is " & Round(144 / Floor(144 / ($sAnswer + 0.25 + 0.08)), 4) & """") ; Display the result.
                Exit
            Case $idMsg = $idRadio5
                $sAnswer = XSkinInputBox("Finished Length", $sFinish & "greater than 12""") ; Places the input box
                XSkinMsgBoxOK("Allocated Length", "For a part with a diameter greater then 12"" and a finished length of " & $sAnswer & _
                        """ the allocated length is " & Round(144 / Floor(144 / ($sAnswer + 0.375 + 0.08)), 4) & """") ; Display the result.
                Exit
        EndSelect
    WEnd
EndFunc   ;==>RadioRequest

Func FormulaCriteria()
    XSkinMsgBoxOK("Formula Criteria", "Example: 6.5"" Diameter and 22.931"" Finished length" & @CRLF & _
            "1) Add 0.25"" to barstock for machining" & @CRLF & _
            "2) Add 0.08"" for saw blade width" & @CRLF & _
            "     A) 22.931"" + 0.25"" + 0.08"" = 23.261""" & @CRLF & @CRLF & _
            "3) Barstock is generally 144"" long (12')" & @CRLF & _
            "     A) 144"" / 23.261"" = 6.190 (6 parts per 144"")" & @CRLF & _
            "     B) 6 * 23.261"" = 139.566"" (Not enough stock for 7 parts)" & @CRLF & _
            "     C) 144"" / 6 = 24"" Allocated Length")
EndFunc   ;==>FormulaCriteria

 

I have the files saved in my D drive in an autoit folder

Capture.JPG

 

“Courage is being scared to death, but saddling up anyway”John Wayne

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...