Run AutoIT script in silent mode - scripting

I have an AutoIT script that will automate all the system testing configurations in my company. It works fine without any user interaction however I am wondering if it will be possible to run in silent mode as the script contains quite a few mouseclicks.
Here is a code snippet:
Run("C:\AutoTestPackage\TestSuite\SmokeTest\WCF\Prerequisite\BISSDK\WcfClient.TestApp.exe")
_WinWaitCheck($WCFClient)
WinActivate($WCFClient)
WinMove($WCFClient, "", 64, 200, 1200, 600)
Sleep(1000)
MouseClick("", 400, 60, 1) ;Click on Username textbox
Sleep(250)
Send($OperatorName)
Sleep(500)
MouseClick("", 700, 60, 1) ;Click on Password textbox
Sleep(250)
Send($FinalOperatorPassword)
Sleep(1000)
MouseClick("", 1080, 50, 1) ;Click on Ping option
Sleep(1000)
MouseClick("", 70, 74, 1); Click on SynchronLogon
Sleep(1000)
Any help would be greatly appreciated :)

Related

RabbitMQ - vhost '/' is down for user 'XYZ'. even after user has all access

I am using RabbitMQ version 3.7.17
As my AWS hard disk was completely occupied(100% full). Due to which all the services stopped working
Solution to this: I extended AWS server memory and than tried to start all the API services after that it started throwing error. (Post this it started giving error)
Connection.open: (541) INTERNAL_ERROR - access to vhost '/' refused for user 'XYZ': vhost '/' is down
Restarted RabbitmMQ server using the below code still it was giving error:
sudo service rabbitmq-server restart
If I checked the permission for my user using:
sudo rabbitmqctl list_permissions --vhost /
Response shows that user has all the access.
Listing permissions for vhost "/" ...
user configure write read
XYZ .* .* .*
Thank You.
As the Memory was full the RabbitMQ that was processing was not completed which resulted it in error in vhost.
When tried to restart vhost sudo rabbitmqctl restart_vhost it got error:
ERROR:
Failed to start vhost '/' on node 'rabbit#ip-172-31-16-172'Reason: {:shutdown, {:failed_to_start_child, :rabbit_vhost_process, {:error, {{{:function_clause, [{:rabbit_queue_index, :journal_minus_segment1, [{{true, <<230, 140, 82, 5, 193, 81, 136, 75, 11, 91, 31, 232, 119, 30, 99, 112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 144>>, <<131, 104, 6, 100, 0, 13, 98, 97, 115, 105, 99, 95, 109, 101, 115, 115, 97, 103, 101, 104, 4, 100, 0, 8, 114, 101, 115, 111, 117, 114, ...>>}, :no_del, :no_ack}, {{true, <<230, 140, 82, 5, 193, 81, 136, 75, 11, 91, 31, 232, 119, 30, 99, 112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 144>>, <<131, 104, 6, 100, 0, 13, 98, 97, 115, 105, 99, 95, 109, 101, 115, 115, 97, 103, 101, 104, 4, 100, 0, 8, 114, 101, 115, 111, 117, ...>>}, :del, :no_ack}], [file: 'src/rabbit_queue_index.erl', line: 1231]}, {:rabbit_queue_index, :"-journal_minus_segment/3-fun-0-", 4, [file: 'src/rabbit_queue_index.erl', line: 1208]}, {:array, :sparse_foldl_3, 7, [file: 'array.erl', line: 1684]}, {:array, :sparse_foldl_2, 9, [file: 'array.erl', line: 1678]}, {:rabbit_queue_index, :"-recover_journal/1-fun-0-", 1, [file: 'src/rabbit_queue_index.erl', line: 915]}, {:lists, :map, 2, [file: 'lists.erl', line: 1239]}, {:rabbit_queue_index, :segment_map, 2, [file: 'src/rabbit_queue_index.erl', line: 1039]}, {:rabbit_queue_index, :recover_journal, 1, [file: 'src/rabbit_queue_index.erl', line: 906]}]}, {:gen_server2, :call, [#PID<10397.473.0>, :out, :infinity]}}, {:child, :undefined, :msg_store_persistent, {:rabbit_msg_store, :start_link, [:msg_store_persistent, '/var/lib/rabbitmq/mnesia/rabbit#ip-172-31-16-172/msg_stores/vhosts/628WB79CIFDYO9LJI6DKMI09L', [], {#Function<2.32138423/1 in :rabbit_queue_index>, {:start, [{:resource, "/", :queue, "xx_queue"}, {:resource, "/", :queue, "app_xxx_queue"}, {:resource, "/", :queue, "default"}, {:resource, "/", :queue, "xx_priority_queue"}, {:resource, "/", :queue, "xxx_queue"}, {:resource, "/", :queue, "xxxx_queue"}, {:resource, "/", :queue, "yyy_queue"}, {:resource, "/", :queue, "zzz_queue"}, {:resource, "/", :queue, "aaa_queue"}]}}]}, :transient, 30000, :worker, [:rabbit_msg_store]}}}}}
STEPS TO SOLVE IT
Stop your app node by below command.
sudo rabbitmqctl stop_app
Reset your node by below command.
Removes the node from any cluster it belongs to, removes all data from the management database, such as configured users and vhosts, and deletes all persistent messages.(Be careful while using it.)
To backup your data before reset look here
sudo rabbitmqctl reset
Start your Node by below command.
sudo rabbitmqctl start_app
Restart your vhost by below commad.
sudo rabbitmqctl restart_vhost
And if you are using some application that is depended on RabbitMQ. Such as I using celery you will have to restart them again.
This was the link that helped me to solve it.

Multiple pixel searches with mouse clicks

WinActivate("BlueStacks App Player")
While 1
$Button1 = PixelSearch(0, 0, 1365, 767, 0x79b82c)
MouseClick("primary", $Button1[0], $Button1[1], 1, 0)
If(PixelSearch(0, 0, 1365, 767, 0x6e6e6e) Or PixelSearch(0, 0, 1365, 767, 0x5e5e5e)) Then
MouseClick("primary", 748, 274, 1, 0)
Else
$Button2 = PixelSearch(0, 0, 1365, 767, 0xfca378)
MouseClick("primary", $Button2[0], $Button2[1], 8, 0)
$Button3 = PixelSearch(0, 0, 1365, 767, 0xfd64a7)
MouseClick("primary", $Button3[0], $Button3[1], 1, 0)
EndIf
WEnd
I am making an automation script for Bluestacks app player.
What I am trying to do is PixelSearch() finds location of the button and then left clicks it, which opens another new window. And again another PixelSearch() finds the new pixels and clicks 8 times on one coordinate and 1 time on another.
I made the infinite loop as I want this to occur infinitely. Problem is, only the first PixelSearch() and MouseClick() works; after the first click the function stops. I want the script to continue even after the new window opens (the window opens inside the same app in Bluestacks).
Try this code :
WinActivate("BlueStacks App Player")
While 1
$Button1 = PixelSearch(0, 0, 1365, 767, 0x79b82c)
If not #error then
MouseClick("", $Button1[0], $Button1[1], 1, 0)
If PixelSearch(0, 0, 1365, 767, 0x6e6e6e) Or PixelSearch(0, 0, 1365, 767, 0x5e5e5e) Then
MouseClick("", 748, 274, 1, 0)
Else
$Button2 = PixelSearch(0, 0, 1365, 767, 0xfca378)
If not #error then MouseClick("", $Button2[0], $Button2[1], 8, 0)
$Button3 = PixelSearch(0, 0, 1365, 767, 0xfd64a7)
If not #error then MouseClick("", $Button3[0], $Button3[1], 1, 0)
EndIf
EndIf
WEnd

How to set auto hight of page for POS software by MPDF in Yii

I am facing a problem when printing pos invoice by MPDF. I don't want to set a fixed height of pdf page. Page height will be adjusted by its content. Here the line of my controller's function from where I am calling MPDF.
$mPDF1 = Yii::app()->ePdf->mpdf('',array('80','130'), 8, '', 5, 5, 5, 5, 0, 0, 'P');
Please give me some idea how to get expected page size.
pls try this
$mpdf=new mPDF('c', 'A4', 0, 'Arial', 10, 10, 10, 10, 10, 10);
OR
$mPDF1 = Yii::app()->ePdf->mpdf('', 'A5');

Length menu being discarded due to sDom in Jquery Datatable?

I have this:
oTable = $("#bla").dataTable({
"iDisplayLength": 50,
"aLengthMenu": [[5, 25, 50, 100, 250, -1], [5, 25, 50, 100, 250, "All"]],
"sDom": "<'call-header'<'dthead'><'ttools'T><'filterinput'f>r><'dttoolbar'><'dataTables_scroll'<'dataTables_scrollBody't>><'call-footer'<'row-fluid'<'span6'i><'span6'p>>>",
.... });
If I comment out the sDom part, I get my length menu and I am able to select the number of items to show on the page. But with the SDOM variable, this just disappears.
I've tried combinations of adding:
<'dataTables_length'>
But I think I am misunderstanding how it works. Can anyone clarify how this must be done?
See the documentation for sDom - the sDom code for Length changing is l.
Here the length menu is being inserted as the very first control :
sDom: "<'call-header'<'dthead'>l<'ttools'T><'filterinput'f>r><'dttoolbar'><'dataTables_scroll'<'dataTables_scrollBody't>><'call-footer'<'row-fluid'<'span6'i><'span6'p>>>"
---^---
fiddle -> http://jsfiddle.net/eCrhb/

Generating PDFs in VB.NET 2005

I am having a problem while generating a PDF doc, the text which I want to show in the PDF doc exceeds the PDF paper range. How can I adjust the text to fit the page range?
This is a sample of my code that shows some questions and answers:
Dim PDF As PDFCreatorPilotLib.PDFDocument3
' create pdf library object
PDF = New PDFCreatorPilotLib.PDFDocument3
' initialize PDF Engine
PDF.StartEngine("demo#demo", "demo")
' set filename
PDF.FileName = "TestVB.PDF"
PDF.AutoLaunch = True ' auto-open generated pdf document
' start document generation
PDF.BeginDoc()
PDF.PDFPAGE_SetActiveFont("Verdana", True, False, False, False, 9, 0)
PDF.PDFPAGE_TextOut(80, 270, 0, Label5.Text)
PDF.PDFPAGE_TextOut(100, 270, 0, Questions1TextBox.Text)
PDF.PDFPAGE_TextOut(80, 300, 0, Label3.Text)
PDF.PDFPAGE_TextOut(100, 300, 0, Answers1TextBox.Text)
PDF.PDFPAGE_TextOut(80, 330, 0, Label6.Text)
PDF.PDFPAGE_TextOut(100, 330, 0, TextBox14.Text)
PDF.PDFPAGE_TextOut(80, 360, 0, Label4.Text)
PDF.PDFPAGE_TextOut(100, 360, 0, TextBox1.Text)
PDF.PDFPAGE_TextOut(80, 390, 0, Label7.Text)
PDF.PDFPAGE_TextOut(100, 390, 0, TextBox12.Text)
PDF.PDFPAGE_TextOut(80, 420, 0, Label4.Text)
PDF.PDFPAGE_TextOut(100, 420, 0, TextBox1.Text)
' finalize document generation
PDF.EndDoc()
End Sub