Sign in to follow this  
Followers 0
The Prince

Input Box

5 posts in this topic

#1 ·  Posted (edited)

Hi to all;

Iam very new in Autoit, I have the follwing loop, which is working well, (objectve: select the first row, click to deleate, a conformation Java window appears asking for conformation, "click Submet Button",...... all OK)

the loop is as follows:

$i = 0

Do

MouseClick("left", 144,99, 1) ;Click to delete allways the first Line

sleep(500)

MouseClick("left", 191,269, 1) ;Click Submit Button

$i = $i + 1

Until $i = $Num

sleep(100)

Exit

where $Num= Number of rows to be deleted, the Problem is how to creat a GUI

which contains an input box to be entered indicating number of rows to be deleated

I tried this code+ the above loop, it didnt work:

Dim $Num="3"

opt("WinTitleMatchMode",2)

opt("MouseCoordMode",2)

#include<GUIConstants.au3>

GuiCreate("Close Pad ",326,200)

$Labale_1=GuiCtrlCreateLabel("Number :",44,42,60,25)

GuiCreate("Input ",100,100)

$Input_Num=GuiCtrlCreateInput("$Num",100,42,60,25)

GUISetState()

; Loop

any help is apriciated

Edited by The Prince

Share this post


Link to post
Share on other sites



one way is to have a simple InputBox() see help

the other is to use a gui ( like you tried )

opt("WinTitleMatchMode",2)
opt("MouseCoordMode",2)
#include<GUIConstants.au3>

Dim $Num="3"

$wgui = GuiCreate("Close Pad ",326,200)
$Labale_1=GuiCtrlCreateLabel("Number :",44,42,60,25)
;GuiCreate("Input ",100,100)
$Input_Num=GuiCtrlCreateInput($Num,100,42,60,25)
$btn = GUICtrlCreateButton("ok", 120, 100, 80, 25)
GUISetState()

While 1
    $msg = GUIGetMsg()
    
    If $msg = $GUI_EVENT_CLOSE Then Exit
    
    If $msg = $btn Then
        $Num = GUICtrlRead($Input_Num)
        GUIDelete($wgui)
        ExitLoop
    EndIf
WEnd

$i = 0
Do
MouseClick("left", 144,99, 1);Click to delete allways the first Line
sleep(500)
MouseClick("left", 191,269, 1);Click Submit Button
$i = $i + 1
Until $i = $Num
sleep(100)
Exit

;where $Num= Number of rows to be deleted, the Problem is how to creat a GUI
;which contains an input box to be entered indicating number of rows to be deleated
;I tried this code+ the above loop, it didnt work:

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

Thanks Valuater, its working

regards

Share this post


Link to post
Share on other sites

Sorry it only excute 2 loops,delete only 2 rows whatever you number you enter in the input GUI, something is wrong??

Share this post


Link to post
Share on other sites

God day for all;

I must describe my project in different way; I have many rows to be deleted every day; several times, I want to automat this process and save time, to delete one row I have to do two steps:

1- click in the first row

2- click in the submit button in the conformation Java Window; which appears when I click in the row to delete it.

I want a simple GUI to perform this task, Were I enter how many rows to be deleted in it ??

Help

Share this post


Link to post
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
Sign in to follow this  
Followers 0