autoitxp Posted November 1, 2007 Share Posted November 1, 2007 (edited) hi this simple add and subtract showing on status bar but im stuck on one thing all working fine like i want it . but subtract method ends on 0 i want this simply ends on 1 . can any one tell me where is problem try this script and let me know soultion expandcollapse popup#include <GUIConstants.au3> #Include <GuiStatusBar.au3> Local $gui Local $a_PartsText[3] Local $a_PartsRightEdge[3] = [200, 500, -1] $add = 1 $gui = GUICreate("Database Gui", 800,600) $StatusBar1 = _GUICtrlStatusBarCreate ($gui, $a_PartsRightEdge, $a_PartsText) $next = GUICtrlCreateButton ("add", 100, 500,100) $prv = GUICtrlCreateButton ("subtract", 300, 500,100) GUISetState (@SW_SHOW) While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $next $add = 1 + $add call("_next") Case $msg = $prv $add = $add - 1 if $add = -1 then $add = 1 EndIf call("_prv") EndSelect Wend func _prv() _GUICtrlStatusBarSetText($StatusBar1,$add) EndFunc func _next() _GUICtrlStatusBarSetText($StatusBar1,$add) EndFunc Edited November 1, 2007 by autoitxp Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted November 1, 2007 Moderators Share Posted November 1, 2007 Case $msg = $prv If $add > 1 Then $add -= 1 _prv() 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 More sharing options...
autoitxp Posted November 1, 2007 Author Share Posted November 1, 2007 Thanks Buddy Link to comment Share on other sites More sharing options...
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