Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how can i automatically click ok button in msgbox popup
#1
Solved: 11 Years, 4 Months, 3 Weeks ago MyBB 
Sad how can i automatically click ok button in msgbox popup.....please let me know..
Reply
#2
Solved: 11 Years, 4 Months, 3 Weeks ago
Where do you get the popup from?
I mean does your code contain something like below:

Code:
Msgbox "Hello World"

If this is the case, the OK button can't be clicked automatically.

If it is not please try using:

Code:
Set WshShell = CreateObject("Wscript.Shell")
WshShell.Popup " Wait 5 seconds ", 5, "Title"

Hope it helps.
Reply
#3
Solved: 11 Years, 4 Months, 3 Weeks ago
hello Prabhat
this is my case..

for i = 1 to 3
msgbox "hello Prabhat"

next

now i want to automatic click in this popup when it show hello prabhat in msgbox.
is it possible?
thanx in advance

Regards,
Ajay

Reply
#4
Solved: 11 Years, 4 Months, 3 Weeks ago
Hi Ajay,

As per my knowledge its not possible, but you can create the MsgBox with time limit. use below code


Code:
For i=0 to 3
    
    Set a=createobject("wscript.shell") 'Creat one object
    msgbox_message="Your Text"
    msgbox_time=5
    msgbox_title=""
    a.popup msgbox_message,msgbox_time,msgbox_title
    
    Set a=Nothing

Next

Regards,
Ankesh
This is the alternate solution....

Istead of writing like msgbox "Hello" , u can just write ur text in the variable like msgbox_message="Your Text" if you are using the above code..
This would serve ur purpose.

Do let me know if u have a query.

Regards,
Ankesh
Reply
#5
Solved: 11 Years, 4 Months, 3 Weeks ago
Hi Ankesh

thanx for this, its working dear, but i have one problem in that hope u notice that prblm is that in this script loop is not working i mean to say popup ll come only one's times but loop is from 1 to 3.....please check it....


thanks,
Ajay
Reply
#6
Solved: 11 Years, 4 Months, 3 Weeks ago
@Ajay, the code is working absolutly fine. I chkd it. I request you to plz re-execute the code.
Reply
#7
Solved: 11 Years, 4 Months, 3 Weeks ago
Hey Ankesh

It is working thanx dear

Thanks,
Ajay
Reply
#8
Solved: 11 Years, 4 Months, 3 Weeks ago
Hello,

Please Check this script.
Collapse | Copy Code

Code:
Dim ak
Set ak = CreateObject("wscript.shell")

For i = 1 to 3

   Set DataTable = ("A",dtglobalsheet)
    MsgBox _message = "A"
    MsgBox_time = 2
    MsgBox_title = "this is demo set"
ak.Popup MsgBox, MsgBox_time,MsgBox_title

Next

I just want to print data table value in Msgbox like Column name "A".

Thanks,
Ajay Kumar
Software Test Engineer
Reply
#9
Solved: 11 Years, 4 Months, 3 Weeks ago
Code:
For i = 1 to 3
Datatable.SetCurrentRow(i)  'Set the row pointer to Currentrow
strValue= Datatable("A",dtGlobalSheet)  'Get the value from datatable
MsgBox_time = 2
MsgBox_title = "this is demo set"
ak.Popup strValue, MsgBox_time,MsgBox_title


Next

Try the above for loop.. It will work.

Regards,
Ankesh
Reply
#10
Solved: 11 Years, 4 Months, 3 Weeks ago
Thanks Ankesh,

It is working fine.
can you please tell me any script for descriptive programming in which we used data table.


Thanks,
A.k
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  no action on click for particular wpf button jlavrecka 1 1,462 05-21-2020, 11:33 PM
Last Post: jlavrecka
  Help for instruction to click on Skip button in the warning message vijilesh 0 1,555 09-16-2018, 03:48 PM
Last Post: vijilesh
  Close popup ad windows dustwynn 1 3,019 10-25-2016, 05:57 PM
Last Post: Ankur
  Unable to Click on Login Button Paurav 1 3,324 07-03-2014, 05:27 AM
Last Post: supputuri
  Right Click On a Image and Click on a Link in WebElement RameshKrishnan 4 5,478 07-10-2013, 04:13 PM
Last Post: RameshKrishnan

Forum Jump:


Users browsing this thread: 1 Guest(s)