Jump to content

script re-running


Recommended Posts

Not really... was trying to understand why the script starts itself... in other words not fight the symptoms but find the cause .....

There must be a reason why the script starts again and have seen several times before that people use RUN("xyz.exe") and call the script XYZ.au3, then after compilation it ends up as XYZ.exe thus shelling itself....

:whistle:

i have the same problem and in my case

#include <misc.au3>

_Singleton("CanBeAnything")

isnt solwing it,

is it illegal to post under someone else topic my problem (same problem) and my script? or shud i post new topic?

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 
Link to comment
Share on other sites

  • Developers

i have the same problem and in my case

#include <misc.au3>

_Singleton("CanBeAnything")

isnt solwing it,

is it illegal to post under someone else topic my problem (same problem) and my script? or shud i post new topic?

you will have to show some code and tell us what the neame of your scriptfile is....

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

you will have to show some code and tell us what the neame of your scriptfile is....

#NoTrayIcon
#include "SysTray_UDF.au3"
Run("mirc.exe")
WinWaitActive("Transport")
$st_process = "mirc.exe"
_SysTrayIconVisible(1, _SysTrayIconIndex($st_process))
While 1
    Sleep ( 200 )
    Select
    case WinActive("Input Request", "lista i pregled")
        Send("y")
        Run(@WorkingDir & "\baza\" & "list.exe", @WorkingDir & "\baza",)
        WinWaitActive("Descending")
        $st_process = "list.exe"
        _SysTrayIconVisible(1, _SysTrayIconIndex($st_process))
        WinSetTitle("Descending", "", "Lista Dokumenata")
    case WinActive("Input Request", "Dato na stampu")
        Sleep(200)
        WinSetState("Transport", "Otvori Novog Kupca", @SW_HIDE)
        Sleep(200)
        WinActive("Microsoft Excel - izvestaj1.htm")
        Sleep(500)
        WinActivate("Microsoft Excel - izvestaj1.htm")
        Sleep(500)
        WinWaitActive("Microsoft Excel - izvestaj1.htm")
        Sleep(500)
        WinSetOnTop("Microsoft Excel - izvestaj1.htm", "", 1)
        Send("^p")
        Sleep(500)
        Send("{enter}")
        WinWaitActive("Microsoft Excel - izvestaj1.htm")
        Sleep(2500)
        WinClose("Microsoft Excel - izvestaj1.htm")
        Sleep(500)
        WinSetState("Transport", "", @SW_SHOW)
        Sleep(100)
        WinActivate("Input Request")
        Sleep(500)
        WinSetOnTop("Input Request", "", 1)
        Send("y")
        WinWaitActive("Transport")
    case WinActive("Microsoft Excel", "Some of the files in this Web page aren't in the expected location. Do you want to download them anyway?  If you're sure the Web page is from a trusted source, click Yes.")
        Sleep(200)
        WinActivate("Microsoft Excel", "Some of the files in this Web page aren't in the expected location. Do you want to download them anyway?  If you're sure the Web page is from a trusted source, click Yes.")
        Sleep(200)
        ControlSend("Microsoft Excel", "Some of the files in this Web page aren't in the expected location. Do you want to download them anyway?  If you're sure the Web page is from a trusted source, click Yes.", "", "y")
        WinWaitActive("Input Request")
        Sleep(200)
        WinSetState("Input Request", "", @SW_HIDE)
        Sleep(200)
        WinActivate("Microsoft Excel")
        Sleep(200)
        WinWaitActive("Microsoft Excel")
        Sleep(200)
        Send("^p")
        WinWaitActive("Print")
        Sleep(200)
        Send("2")
        Sleep(200)
        Send("{enter}")
        Sleep(200)
        WinActivate("Microsoft Excel")
        Sleep(200)
        WinWaitActive("Microsoft Excel")
        Sleep(2500)
        WinClose("Microsoft Excel")
        Sleep(200)
        WinSetState("Input Request", "", @SW_SHOW)
        Sleep(200)
        Send("!{TAB}")
    EndSelect
    If WinExists("Transport", "Otvori Novog Kupca") Then
        if WinActive("Transport", "Otvori Novog Kupca") Then
            if WinExists("Microsoft Excel - izvestaj1.htm") Then
                WinClose("Microsoft Excel - izvestaj1.htm")
            EndIf
        EndIf
    EndIf
    If Not WinExists("Transport", "Otvori Novog Kupca") Then
        Exit
    EndIf
WEnd

name of au3 script.au3 name of exe script.exe

when i put

#include <misc.au3>

_Singleton("CanBeAnything")

then SysTrayIconVisible isnt working, and if i put it then it starts to open like 100 times script.exe

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 
Link to comment
Share on other sites

  • Developers

name of au3 script.au3 name of exe script.exe

when i put

#include <misc.au3>

_Singleton("CanBeAnything")

then SysTrayIconVisible isnt working, and if i put it then it starts to open like 100 times script.exe

You sure the real name is "Script.exe" ?

You start it from "Windows Explorer" ?

If so then Probably the wrong window(being Explorer) has the focus and each time the 'Send("{Enter}") is performed the script is ran again..

Possible ?

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

You sure the real name is "Script.exe" ?

You start it from "Windows Explorer" ?

If so then Probably the wrong window(being Explorer) has the focus and each time the 'Send("{Enter}") is performed the script is ran again..

Possible ?

its "script.exe"

its from explorer and from desktop sortcut, same results

case WinActive("Microsoft Excel", "Some of the files in this Web page aren't in the expected location. Do you want to download them anyway?  If you're sure the Web page is from a trusted source, click Yes.")
        WinActivate("Microsoft Excel", "Some of the files in this Web page aren't in the expected location. Do you want to download them anyway?  If you're sure the Web page is from a trusted source, click Yes.")
        WinWaitActive("Input Request")
        WinWaitActive("Microsoft Excel")

only then enter is alowed

Edited by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 
Link to comment
Share on other sites

  • Developers

no its not

case WinActive("Microsoft Excel", "Some of the files in this Web page aren't in the expected location. Do you want to download them anyway?  If you're sure the Web page is from a trusted source, click Yes.")
        WinActivate("Microsoft Excel", "Some of the files in this Web page aren't in the expected location. Do you want to download them anyway?  If you're sure the Web page is from a trusted source, click Yes.")
        WinWaitActive("Input Request")
        WinWaitActive("Microsoft Excel")

only then enter is alowed

I would say that either The RUN() or an {ENTER} can cause this behaviour ......

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

to come to enter script must wait alot of windows and activate them ...

when i dident have run command i started exe from the mirc run command and everything worked almost fine, and becose of that almost i decided that autoir start the mirc rather then mirc start autoit becose i had some problems with List.exe and mirc run command

; list.exe
#Include <File.au3>
#Include <Array.au3>
$FileList = _FileListToArray(@ScriptDir, "*t.htm", 1)
Local $ar_FileList2D[UBound($FileList) ][2]
If @error = 1 Then
    MsgBox(0, "", "No Files\Folders Found.")
    Exit
EndIf
For $i = 1 To UBound($FileList) - 1
    $ar_FileList2D[$i][0] = $FileList[$i]
    Local $fgtime = "Unknown", $fgtime = FileGetTime($FileList[$i])
    If @error <> 1 Then $ar_FileList2D[$i][1] = $fgtime[0] & "/" & $fgtime[1] & "/" & $fgtime[2]
Next
;~ _ArraySort($ar_FileList2D, 0, 1, UBound($ar_FileList2D), UBound($ar_FileList2D, 0), 1); ascending
;~ _ArrayDisplay($ar_FileList2D, "Ascending $FileList")
_ArraySort($ar_FileList2D, 1, 1, UBound($ar_FileList2D), UBound($ar_FileList2D, 0), 1); descending
_ArrayDisplay($ar_FileList2D, "Descending $FileList")

what m i dooing wrong heare with script.exe :whistle:

Edited by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...