hilfe GuiControl+textbox

Stelle Fragen zur Programmierung mit Autohotkey

Moderator: jNizM

Servan
Posts: 14
Joined: 25 Feb 2014, 03:53

hilfe GuiControl+textbox

07 Jun 2014, 08:07

Hallo

Ich habe eine textbox und wenn ich in der textbox rein klicke wird mir alles gelöscht was drin steht das ist auch super so nur ich weiss jetzt leider nicht mehr weiter, weill ich möchte das wenn ich in die textbox rein clicke es jedesmal +1 dazu gerechnet wird.
also eine textbox in der "1" steht und wenn ich in die textbox klicke soll "2" stehen und wenn ich nochmal klicke soll "3" stehen und so weiter bis "10" danach soll es wieder auf "1" springen. kann mir jemand dabei helfen bitte

hier mein code:

Code: Select all

#SingleInstance, force 
Gui, Add, Edit, r4 w100 vMyEdit, 1
Gui, Show, w250 h200 
OnMessage(0x201, "WM_LBUTTONDOWN") 
return 

WM_LBUTTONDOWN(wParam, lParam) 
{ 
    if (A_GuiControl = "MyEdit") { 
     GuiControl,, MyEdit,
    } 
} 

GuiClose: 
ExitApp
danke für jede antwort
just me
Posts: 9451
Joined: 02 Oct 2013, 08:51
Location: Germany

Re: hilfe GuiControl+textbox

07 Jun 2014, 08:21

Code: Select all

#NoEnv
#SingleInstance, force
Gui, Add, Edit, r4 w100 vMyEdit, 1
Gui, Show, w250 h200
OnMessage(0x201, "WM_LBUTTONDOWN")
Return

WM_LBUTTONDOWN(wParam, lParam)
{
   If (A_GuiControl = "MyEdit") {
      GuiControlGet, MyEdit
      MyEdit += 1
      If (MyEdit > 10)
         MyEdit := 1
      GuiControl, , MyEdit, %MyEdit%
   }
}

GuiClose:
ExitApp
Servan
Posts: 14
Joined: 25 Feb 2014, 03:53

Re: hilfe GuiControl+textbox

07 Jun 2014, 08:24

danke just me :)
funktioniert super

Return to “Ich brauche Hilfe”

Who is online

Users browsing this forum: No registered users and 68 guests