
vaibhavs
Active Members-
Posts
49 -
Joined
-
Last visited
vaibhavs's Achievements

Seeker (1/7)
0
Reputation
-
Hi, As per your calculations, it worked, but a bit off: My code is #include 'printMGv2.au3' Global $hp Local $mmssgg,$marginx,$marginy $Payto = "My Company Inc" $hp = _PrintDllStart($mmssgg) ;this must always be called first $newselect = _PrintSetPrinter($hp) _PrintPageOrientation($hp,0) ;landscape _PrintStartPrint($hp) _PrintSetFont($hp,'Verdana',18,0) _PrintText($hp,$Payto,10, 46.9) _PrintEndPrint($hp) _PrintDllClose($hp) ;this must always be called last The text "My Company Inc" was printed 12mm from top & 14mm from left. I could not figure out why 12mm from top and 14mm from left ? I guess it should have printed 10mm from left. Do I understand this correct ? Please suggest. Thx Vai
-
Hi Martin, Thx for the great udf. I did a `hello world` & it works great! I am novice at programming, need some help please. I am planning to make a Check Printing script. Check paper size = 8 inch width x 3.3 inch height. Printing in landscape mode. I want my users to be independent of the Printer Preferences (which is typically set to A4 size, Portrait mode) . I have read all 8 pages of this thread and I could not gather much. Can you please help me with the basic script which will help me print in landscape mode on a check of size 8 inch width x 3.3 inch height without modifying the standard printer preferences (which are set to a typical A4 size sheet in Portrait mode). Thx for your help! Best regards, Vai
-
Hi, I want to create an application which will take a user input "Record Number", fetch corresponding data from MySQL and print the data on a bank cheque (bank check). The critical part is printing text at exact positions on the cheque (check) like NAME, AMOUNT, Amount in words, DATE etc. Since cheques (checks) are pre-printed, we have to be very accurate in printing the data the the right position. Please suggest how can I do this. Thx Vai
-
_IEFormImageClick (Image not found)
vaibhavs replied to vaibhavs's topic in AutoIt General Help and Support
will try this. Thx -
Hi, I am using the below function, but sometimes if the image is not found on the page, the script throws an error and stops to execute further. I would like to build a check before using _IEFormImageClick function to check if the image exists, if not, then `CONTINUELOOP`. How do I add an `if` check for the image "button_confirm.gif" _IEFormImageClick ($oIE1, "/images/button_confirm.gif", "src") Thx in advance. Best regards, Vai
-
Hi, I would like to submit a form with the data in the URL using method=GET: http://www.some.com/a.php?u=aaa&p=bbb&n=cccc And get the resulting page content and display it using msgbox() Please advice what code should I use, I am totally lost here. Thx Vai
-
Hi, How can I get the Gateway IP Address ? The script will be being by a non-admin user. I have searched a lot and tried different ideas, but no success. Best regards, Vai
-
Notepad : Send : CTRL+H : Find-Replace
vaibhavs replied to vaibhavs's topic in AutoIt General Help and Support
oh yes, Its worked great!! Thx a ton for your help regards, Vai -
Hi, I have a text file which is already open in notepad. I wish to simulate a CTRL+h -- Find Replace keystrokes. How can I do this ?? I tried some combination as below, but none worked!! send ("{LCTRL+H}") send ("{LCTRL}+{H}") I guess I am missing something here.... Please advice. Thx Vai
-
Hi, I have a list of buttons which I need to FIND & SUBMIT manually. I want to develop a script which can do this automatically. Let me explain: Please see the html code at the end of the post. Currently, I press CTRL+F and search for a string (say 25162). Then need to press the BUTTON in the row where 25162777 is found. I wish to automate this process. I have tried some scripts using "_IETableGetCollection" etc, but somehow I am not able to SUBMIT the button in the same row where the text is located. Members, please help me with this script. Thx in advance. regards, Vai <table> <tr> <td>25162</td> <td><input type="button" value="Mark As ed" onclick="java script:__doPostBack('ctPlaceHolder$ViewReq','mark$250')" /></td> </tr> <tr class="GridViewTransactionsalt"> <td>25133</td> <td><input type="button" value="Mark As ed" onclick="java script:__doPostBack('ctPlaceHolder$ViewReq','mark$251')" /></td> </tr> <tr> <td>25172</td> <td><input type="button" value="Mark As ed" onclick="java script:__doPostBack('ctPlaceHolder$ViewReq','mark$252')" /></td> </tr> <tr class="GridViewTransactionsalt"> <td>8AB66</td> <td><input type="button" value="Mark As ed" onclick="java script:__doPostBack('ctPlaceHolder$ViewReq','mark$253')" /></td> </tr> <tr> <td>25145</td> <td><input type="button" value="Mark As ed" onclick="java script:__doPostBack('ctPlaceHolder$ViewReq','mark$254')" /></td> </tr> <tr class="GridViewTransactionsalt"> <td>25173</td> <td><input type="button" value="Mark As ed" onclick="java script:__doPostBack('ctPlaceHolder$ViewReq','mark$255')" /></td> </tr> </table>
-
Hi, I wish to create a scrip which will block all out bound ports except some standard ports like 110, 80, 443. I was thinking if I can write a script which will capture all outbound port requests; excluding the above. Please send me some pointers / help on this. Thx Vai
-
Finding first form button & Click ?
vaibhavs replied to vaibhavs's topic in AutoIt General Help and Support
Anyone with any solution for this?? I am in realy need for a solution to this problem. Please help!! Vai -
Finding first form button & Click ?
vaibhavs replied to vaibhavs's topic in AutoIt General Help and Support
Hi ProgAndy, Thx for the script, but I guess I did not explain the problem well. I have an online webpage with a row of buttons. Buttons do not have any unique tag. I need to click certain buttons based on certain evaluations. I am trying to create a script / function which will click a particular button. I have pasted a more detailed example here. <html> <head> <title>TTTTTT</title> </head> <body> <form name="myform" method="post" action="myaction.php"> <table border="1" cellpadding="0" cellspacing="0"> <tr> <td width="50%">1111</td> <td width="50%"> <input type="button" value="Press Me" onclick="java script:alert('1111111111')"/></td> </tr> <tr> <td width="50%">2222</td> <td width="50%"> <input type="button" value="Press Me" onclick="java script:alert('2222222222')"/></td> </tr> <tr> <td width="50%">3333</td> <td width="50%"> <input type="button" value="Press Me" onclick="java script:alert('3333333333')"/></td> </tr> <tr> <td width="50%">4444</td> <td width="50%"> <input type="button" value="Press Me" onclick="java script:alert('4444444444')"/></td> </tr> <tr> <td width="50%">5555</td> <td width="50%"> <input type="button" value="Press Me" onclick="java script:alert('5555555555')"/></td> </tr> </table> </form> </body> </html> When I am evaluating the first row, I have to "click" the button in the first row. Likewise, when I working on the 3rd row, I need to "click" the button in the 3rd row. Is there anyway I can reference the button of a particular row and "click" it. I was thinking of the following 2 functions: $row = _IETableWriteToArray($oTable2) _IEAction ($ref, "click") Any ideas are appreciated I am really stuck with this one and its very imp part of my script!! Looking for some help. Vai -
Hi, I have a web page as below: <html> <head> <title>TTTTTT</title> </head> <body> <form name="myform" method="post" action="myaction.php"> <input type="button" value="Press Me" onclick="java script:alert('1111111111')"/><br> <input type="button" value="Press Me" onclick="java script:alert('2222222222')"/><br> <input type="button" value="Press Me" onclick="java script:alert('3333333333')"/><br> <input type="button" value="Press Me" onclick="java script:alert('4444444444')"/><br> <input type="button" value="Press Me" onclick="java script:alert('5555555555')"/><br> </form> </body> </html> I want to "Click" the first button. How can I do this ? Tried some options but could not get thru. I tried this: #include <IE.au3> #Include <Constants.au3> $oIE = _IEAttach ("TTTTTT", "Title") _IELoadWait ($oIE) $oForm = _IEFormGetObjByName ($oIE, "myform") $oQuery = _IEFormElementGetCollection ($oForm, 1) _IEAction ($oQuery, "click") But it did not work. I am sure I am not calling the correct function. Please help! Thx Vai
-
I will try the sleep(10). Thx a ton to all. Cheers, Vai