Khryus Posted August 1, 2012 Posted August 1, 2012 Hi, I was trying to embed a progressbar inside a statusbar. I took some code snippets from the help file, and got this: $StatusBar1 = _GUICtrlStatusBar_Create($Form1_1) $Progress1 = GUICtrlCreateProgress(0, 0, -1, -1) _GUICtrlStatusBar_SetBkColor($StatusBar1, 0x808080) _GUICtrlStatusBar_SetMinHeight($StatusBar1, 20) Local $aParts[2] = [570, 98] _GUICtrlStatusBar_SetParts($StatusBar1, $aParts) _GUICtrlStatusBar_EmbedControl($StatusBar1, 2, $Progress1, 4) When I run the script, it throws out this error: C:\Program Files (x86)\AutoIt3\Include\GuiStatusBar.au3 (257) : ==> Subscript used with non-Array variable.: Local $iBarX = $aRect[0] Local $iBarX = $aRect^ ERROR Using these: #include <Array.au3> #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <GUIListBox.au3> #include <GuiStatusBar.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <ProgressConstants.au3> #include <SendMessage.au3> Opt("GUIOnEventMode", 1) Did I do something wrong? "The story of a blade is linked in Blood." ―Yasuo
Moderators JLogan3o13 Posted August 1, 2012 Moderators Posted August 1, 2012 Hi, megablox. The error states that you're trying to read from $aRect[0] when this field does not exist. Can you please post your entire code, so we can see where you're interacting with $aRect? "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
Khryus Posted August 1, 2012 Author Posted August 1, 2012 (edited) Problem solved! I called _GUICtrlStatusBar_EmbedControl($StatusBar1, 2, $Progress1, 4) wrongly, fixed by changing 2 to 1 @JLogan3o13 , I fixed, thanks for helping though! ^^ Edited August 1, 2012 by megablox "The story of a blade is linked in Blood." ―Yasuo
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