Nareshm

Help for create autoit script

11 posts in this topic

#1 ·  Posted

Please Somebody Help me i am trying to create new script but, i don't know how to create it.

I am Creating script like this :
; My script here [First Script]
Check the internet connection, if internet connected then
; My Script here [Second Script]
If internet not connected, wait for connect, after connected run my second script
If Control id/windows/title matched do nothing and end/exit autoit script
If Control id/windows/title not matched repeat my first and second script again until control id/windows/tittle not matched

match with :

>>>> Window <<<<
Title:    PS :: Version - 2.8.0.0  - [PS Bill]
Class:    WindowsForm734a
Position:    -8, -8
Size:    1382, 744
Style:    0x17CD0000
ExStyle:    0x00050100
Handle:    0x0000000000130572

>>>> Control <<<<
Class:    WindowsForm734a
Instance:    15
ClassnameNN:    WindowsForm34a15
Name:    BillPrint
Advanced (Class):    [NAME:BillPrint]
ID:    7875
Text:    
Position:    39, 310
Size:    1221, 306
ControlClick Coords:    745, 20
Style:    0x56010000
ExStyle:    0x00000000
Handle:    0x00000000000C0468

 

Share this post


Link to post
Share on other sites



#2 ·  Posted

How much can you pay for your problem to be solved?

No code, no help!

Search and try, just ask when necessary!

- Check the internet connection:

#include <WinAPIDiag.au3>

ConsoleWrite('Internet connected: ' & (_WinAPI_IsNetworkAlive() <> 0) & @CRLF)


- Check  windows:

WinExists("PS :: Version - 2.8.0.0  - [PS Bill]")

 

If...ElseIf...Else...EndIf Conditionally run statements:

If <expression> Then
statements
...
[ElseIf expression-n Then
[elseif statements ... ]]
...
[Else
[else statements]
...
EndIf

 

- Loop Script:

While <expression>
statements
...
WEnd
Do
statements
...
Until <expression>
For <variable> = <start> To <stop> [Step <stepval>]
statements
...
Next

 


Regards,
 

Share this post


Link to post
Share on other sites

#3 ·  Posted

7 minutes ago, VIP said:

How much can you pay for your problem to be solved?

No code, no help!

Uh? ...  Why do you feel you have the rights to make that statement ....  and then still provide some code?

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#4 ·  Posted

9 minutes ago, VIP said:

How much can you pay for your problem to be solved?

No code, no help!

Search and try, just ask when necessary!

- Check the internet connection:

#include <WinAPIDiag.au3>

ConsoleWrite('Internet connected: ' & (_WinAPI_IsNetworkAlive() <> 0) & @CRLF)


- Check  windows:

WinExists("PS :: Version - 2.8.0.0  - [PS Bill]")

 

If...ElseIf...Else...EndIf Conditionally run statements:

If <expression> Then
statements
...
[ElseIf expression-n Then
[elseif statements ... ]]
...
[Else
[else statements]
...
EndIf

 

- Loop Script:

While <expression>
statements
...
WEnd
Do
statements
...
Until <expression>
For <variable> = <start> To <stop> [Step <stepval>]
statements
...
Next

 

I don't Understand this please explain how to do it ?

Share this post


Link to post
Share on other sites

#5 ·  Posted

Just now, Nareshm said:

I don't Understand this please explain how to do it ?

See my post in the other thread! Stop begging for code and study the Helpfile/ answers given in an effort to comprehent then. 
It can't be you have actually spent time trying to understand this!

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#6 ·  Posted

4 minutes ago, Jos said:

See my post in the other thread! Stop begging for code and study the Helpfile/ answers given in an effort to comprehent then. 
It can't be you have actually spent time trying to understand this!

Jos

@Jos
I tried but every time i am fail, I am finished i can't try more

Share this post


Link to post
Share on other sites

#7 ·  Posted

Ok, let me make myself very clear: 

It can't be that you get that extensive answer from @VIP and you answer within 10 minutes that you can't get it to work. This simply means you have tried hard enough to understand, open the helpfile and read, open SciTE and try ... etc ....  There is no way this is possible!
So again: Try harder!

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#8 ·  Posted

1 minute ago, Jos said:

Ok, let me make myself very clear: 

It can't be that you get that extensive answer from @VIP and you answer within 10 minutes that you can't get it to work. This simply means you have tried hard enough to understand, open the helpfile and read, open SciTE and try ... etc ....  There is no way this is possible!
So again: Try harder!

Jos

@Jos
i try to make script before then i post my question and main problem is i can't understand english very well

Share this post


Link to post
Share on other sites

#9 ·  Posted

Jos

16 minutes ago, Jos said:

Uh? ...  Why do you feel you have the rights to make that statement ....  and then still provide some code?

Jos

Why do I need power when declaring anything?
If anything I say violates regulations and rules of the forum please behave as prescribed!

-------------------

Nareshm

2 minutes ago, Nareshm said:

@Jos
i try to make script before then i post my question and main problem...

You want to be helped, you need to show others your efforts!
I do not see any of your code here!

Your difficult problem it looks like this:

#include <WinAPIDiag.au3> ; for function check internet connect

While 1 ; repeat your script!
    If WinExists("PS :: Version - 2.8.0.0  - [PS Bill]") Then ExitLoop
    ;===> Your first script here
    If _WinAPI_IsNetworkAlive() Then
        ;===>  Your second scrip here
    Else
        ContinueLoop 
    EndIf
    Sleep(1000) ; delay 1s for internet chekc
WEnd
;===>  End your script here

 


Regards,
 

Share this post


Link to post
Share on other sites

#10 ·  Posted

Just now, VIP said:

Why do I need power when declaring anything?

You don't, but you are acting like you are a longtimer on this forum, which you aren't ...right? 
We do always appreciate people trying to help out, which you clearly are! 

Jos 

 


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#11 ·  Posted

@Jos
please give a some time i trying to make script

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

  • Similar Content

    • cu0x
      By cu0x
      Hello guys,
       
      im trying to solved a problem that I have.
       
      Need to get some chinese text from an old Wise script, and in the wise file says f.e. Ù×÷ϵͳ¡£ ÇëÉý¼¶Ä. Is there any way to convert it to traditional chinese?
       
      Already tryied the following code...
       
      #include <MsgBoxConstants.au3> Example() Func Example() ; Define the string that will be converted later. ; NOTE: This string may show up as ?? in the help file and even in some editors. ; This example is saved as UTF-8 with BOM. It should display correctly in editors ; which support changing code pages based on BOMs. Local Const $sString = "Ù×÷ϵͳ¡£ ÇëÉý¼¶Ä" ; Temporary variables used to store conversion results. $dBinary will hold ; the original string in binary form and $sConverted will hold the result ; afte it's been transformed back to the original format. Local $dBinary = Binary(""), $sConverted = "" ; Convert the original UTF-8 string to an ANSI compatible binary string. $dBinary = StringToBinary($sString) ; Convert the ANSI compatible binary string back into a string. $sConverted = BinaryToString($dBinary) ; Display the resulsts. Note that the last two characters will appear ; as ?? since they cannot be represented in ANSI. DisplayResults($sString, $dBinary, $sConverted, "ANSI") ; Convert the original UTF-8 string to an UTF16-LE binary string. $dBinary = StringToBinary($sString, 2) ; Convert the UTF16-LE binary string back into a string. $sConverted = BinaryToString($dBinary, 2) ; Display the resulsts. DisplayResults($sString, $dBinary, $sConverted, "UTF16-LE") ; Convert the original UTF-8 string to an UTF16-BE binary string. $dBinary = StringToBinary($sString, 3) ; Convert the UTF16-BE binary string back into a string. $sConverted = BinaryToString($dBinary, 3) ; Display the resulsts. DisplayResults($sString, $dBinary, $sConverted, "UTF16-BE") ; Convert the original UTF-8 string to an UTF-8 binary string. $dBinary = StringToBinary($sString, 4) ; Convert the UTF8 binary string back into a string. $sConverted = BinaryToString($dBinary, 4) ; Display the resulsts. DisplayResults($sString, $dBinary, $sConverted, "UTF8") EndFunc ;==>Example ; Helper function which formats the message for display. It takes the following parameters: ; $sOriginal - The original string before conversions. ; $dBinary - The original string after it has been converted to binary. ; $sConverted- The string after it has been converted to binary and then back to a string. ; $sConversionType - A human friendly name for the encoding type used for the conversion. Func DisplayResults($sOriginal, $dBinary, $sConverted, $sConversionType) MsgBox($MB_SYSTEMMODAL, "", "Original:" & @CRLF & $sOriginal & @CRLF & @CRLF & "Binary:" & @CRLF & $dBinary & @CRLF & @CRLF & $sConversionType & ":" & @CRLF & $sConverted) EndFunc ;==>DisplayResults Thanks a lot!
    • nacerbaaziz
      By nacerbaaziz
      Hi dear
      I want create retractable bar using autoit
      I tried creating slider, but there's a problem with screen reader for the blind, so is there another retractable tape?
      It is advisable to not accept dragging with the keybord only with  mouse
      note:
      This bar is needed in the process of raising and lowering the volume
      I hope that there is a solution to do that
      i waiting your responses.
      Thanks in advance to all members and administrators
    • XanzyX
      By XanzyX
      Is there a function out there that will edit an existing file witha a "Save" and "Cancel" at the bottom?
      Example: Funcrion("TestFile.txt")
    • rte7
      By rte7
      Hello. We work with the BMC Remedy site to manage incidents and would like to automate the processes of clicking through this button code:
      <a href="javascript:" class="btn btn3d menu" style="top:21; left:184; width:21; height:21;"> <img class="btnimg" src="../../../../resources/images/mt_sprites.gif" alt="menu category issue" title=""> </a> I use firefox with mozrepl and autoit with include FF.au3
      I need your help
      I read the topic https://www.autoitscript.com/forum/topic/95595-ffau3-v0601b-10/ but I could not run the code from the listed commands
      ...
      It is necessary to press the button and from the list of the menu of cahorsations to select the item = "zone of trust abonent"
      Screen # 1 http://joxi.ru/52aJK7bh4a7ypA or below.
      1) Press button
      <a href="javascript:" class="btn btn3d menu" style="top:21; left:184; width:21; height:21;"> <img class="btnimg" src="../../../../resources/images/mt_sprites.gif" alt="menu category issue" title=""> </a>
      2) After pressing the button, I need to choose in this menu of 4 items to select an item called "zone of trust abonent", Screen # 2 - http://joxi.ru/p27gwQKHo71VQ2
      html code table items
      <table class="MenuTable" cellpadding="0" cellspacing="0" style="width: 179px;"> <tbody class="MenuTableBody"> <tr class="MenuTableRow"> <td class="MenuEntryName" nowrap="">zone of trust abonent</td> <td class="MenuEntryNoSub" arvalue="zone of trust abonent"></td> </tr> <tr class="MenuTableRow"><td class="MenuEntryName" nowrap="">zone of trust operator</td> <td class="MenuEntryNoSub" arvalue="zone of trust operator"></td> </tr> <tr class="MenuTableRow"><td class="MenuEntryName" nowrap="">zone of trust third operator</td> <td class="MenuEntryNoSub" arvalue="zone of trust third operator"></td></tr> <tr class="MenuTableRow"><td class="MenuEntryNameHover" nowrap="">No settings</td> <td class="MenuEntryNoSubHover" arvalue="No settings"></td> </tr> </tbody> </table>
       
       
      More in detail, I choose from the menu item "zone of trust abonent" Screen # 3 - http://joxi.ru/GrqVq4ZIQEPW4m

       
      3) The choice is made, Screen # 4 http://joxi.ru/v297w6aC3PovLr
      <textarea class="text sr " wrap="off" id="arid_WIN_0_1000002488" cols="20" maxlen="60" style="top:21; left:0; width:179; height:21;" armenu="CFG:PRC:CategoryHPD-Res-T1-Q" mstyle="2" arautoc="1" arautocmb="1" arautocak="0" arautoctt="400" rows="1"> </textarea>
       
      It's all. I would be very grateful to you =) !!!!!!!!!!
      Here are more detailed codes in the attachment. 
      button1.txt
      menu - table.txt
      all.txt
    • nacerbaaziz
      By nacerbaaziz
      Hello
      How are you
      I have a question, please.
      I've created a window and i need
      when i run the script if it detect an other copy from the same script was runing
       the script close the first copy Automatically and run a new copy
      I want an example to understand it