Jump to content

Set Title doesn't "stick"


OldMike
 Share

Recommended Posts

To control several instances of the same application running concurrently (asynchronously) I need to be able to give focus arbitrarily. That is most easily done with WinActivate("Title"), so each instance needs a unique title. To test this small part I have a simple program that can loop "n" times, but to get started I have limited to loops to one. The test program works fine with multiple instances of launching (and later controlling focus to) four sessions of Notepad. But with my target program, ABBYY (an OCR program) the title changes, then immediately reverts back to unchanged at the next instruction.

#include<file.au3>

#Include<array.au3>

opt("WinTitleMatchMode",-3)

For $i = 1 to 1

Run("C:\Program Files (x86)\ABBYY FineReader 10\FineReader.exe")

Sleep(3000)

WinSetTitle("Untitled document - ABBYY FineReader 10 Professional Edition", "", "ABBYY" & $i) ;New Title of Window

Sleep(5000)

Next

msgbox(0,"","Done")

When I run it, the title at the top and icon in the bottom tray both change to "ABBYY1". But as soon as the program hits the msgbox step, the title goes back to "Untitled document - ABBYY FineReader 10 Professional Edition", top and bottom. It works fine with Notepad, but the title change does not 'stick' with ABBYY.

If I don't have the msgbox at the end, then the title change sticks (and if the loop is more than once, it sticks only for the last instance), but as soon as I touch the mouse or any key, then the title reverts to the stock title. Different MatchModes have not made any difference. What could be different about ABBYY that it fails, while with Notepad it is fine??

Link to comment
Share on other sites

That requires you to keep track of the titles. Why bother? Get the handles of the windows and just use those. The handle is always unique, and never changes for the life of the window even if the title does.

#include <Array.au3> ; Only for _ArrayDisplay()

For $i = 1 To 3
    Run("Notepad.exe")
    Sleep(2000)
Next
$aWinList = WinList("[CLASS:Notepad]", "")

; Note window handles in [n][1]
_ArrayDisplay($aWinList, "List of windows")

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Here is a quick example of controlling multiple instances of notepad by handles instead of titles. As mentioned above, you can change the title and the handle is still valid.

#include <GUIConstantsEx.au3>
#include <array.au3>
Dim $ArrayHwnd[1] = [0]

For $i = 1 To 10
    $PID = Run(@WindowsDir & "\system32\notepad.exe", '', @SW_HIDE)
    WinWait("[CLASS:Notepad]", "")
    $WinList = WinList()
    For $a = 1 To $WinList[0][0]
        If WinGetProcess($WinList[$a][0]) = $PID And $WinList[$a][0] <> '' Then
            $ArrayHwnd[0] += 1
            _ArrayAdd($ArrayHwnd, $WinList[$a][1])
            WinMove($WinList[$a][1], '', 0, $i * 25 - 25)
            WinSetState($WinList[$a][1], '', @SW_SHOW)
            ExitLoop
        EndIf
    Next
Next

;JUST A QUICK EXAMPLE GUI BELOW

If $ArrayHwnd[0] = 0 Then
    MsgBox(0, 'Error', 'No window handles were in the array')
    Exit
EndIf
GUICreate('test', 220, 120)
GUICtrlCreateLabel("Window Handles", 10, 2, 200, 16)
$Combo = GUICtrlCreateCombo($ArrayHwnd[1], 10, 20, 200, 20)
If $ArrayHwnd[0] > 1 Then GUICtrlSetData(-1, _ArrayToString($ArrayHwnd, '|', 2))
GUICtrlCreateLabel("Title:", 10, 42)
$Ititle = GUICtrlCreateInput("", 10, 60, 200)
$Btitle = GUICtrlCreateButton("Change Title", 10, 90, 200)
GUISetState(@SW_SHOW)
$OldSel = ''
$CurSel = ''
While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            For $a = 1 To $ArrayHwnd[0]
                If WinExists($ArrayHwnd[$a]) Then WinClose($ArrayHwnd[$a])
            Next
            Exit
        Case $Btitle
            For $a = 1 To $ArrayHwnd[0]
                If $ArrayHwnd[$a] = $CurSel And WinExists($ArrayHwnd[$a]) Then
                    GUICtrlSetData($Ititle, WinSetTitle($ArrayHwnd[$a], '', GUICtrlRead($Ititle)))
                    GUICtrlSetData($Ititle, WinGetTitle($ArrayHwnd[$a]))
                    ExitLoop
                EndIf
            Next
    EndSwitch
    $CurSel = GUICtrlRead($Combo)
    If $CurSel <> $OldSel Then
        $OldSel = $CurSel
        For $a = 1 To $ArrayHwnd[0]
            If $ArrayHwnd[$a] = $CurSel And WinExists($ArrayHwnd[$a]) Then
                GUICtrlSetData($Ititle, WinGetTitle($ArrayHwnd[$a]))
                ExitLoop
            EndIf
        Next
    EndIf
    Sleep(10)
WEnd
Link to comment
Share on other sites

I have a version of my program using handles. I saved the handles in an array (the OCR sessions complete independently, so need to be able to identify a specific one to shut down and restart). However I could not later get focus to the one I want using handles. All of the focus functions want to use Title, and substituing handle did not work.

WinActivate($handle[$n],"")

WinActive($handle[$n,""])

hangs forever.

I tried both of these suggested programs. Both work fine with Notepad; both returned a null list of handles launching FineReader

Edited by OldMike
Link to comment
Share on other sites

Just to frame this up; I have had several suggestions of how to launch (this and another related posting) the four sessions, all of which work. But I need to be able to shut down an arbitrary session. All the focus and shutdown functions want to use Title, but Title doesn't stick with ABBYY. So I need a way to either get focus or shut down the process using PID or Handle or any other means.

Link to comment
Share on other sites

  • Moderators

OldMike,

All of the focus functions want to use Title, and substituing handle did not work.

Whenever you see "Title" in an AutoIt command, you can ALWAYS use the handle - see the Help file <Using Autoit - Window Titles and Text (Advanced)>:

"When you have a handle you may use it in place of the title parameter in any of the function calls that use the title/text convention. The advantage of using window handles is that if you have multiple copies of an application open - which have the same title/text - you can uniquely identify them when using handles. When you use a window handle for the title parameter then the text parameter is completely ignored."

You do realise that the code you posted is not correct? :)

WinActivate($handle[$n],"")
WinActive($handle[$n,""]) ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

It should read:

WinActivate($handle[$n],"")
WinActive($handle[$n],"") ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

Hardly surprising it hangs when you are waiting for a window which will never appear. ;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Are handles and PIDs the same thing?

No, handles, or more accurately, window handles (usually hWnd), are handles to windows. Process IDs or PIDs are handles to processes.

Additionally, a window handle always belongs to 1 process ID, but a process ID may be associated with several window handles. This is why there is a straightforward built-in function called WinGetProcess, but not a straightforward or built-in function called ProcessGetWin.

Edited by Manadar
Link to comment
Share on other sites

This never activates / gives focus so that I can send the keys I need.

#include<file.au3>

#Include<array.au3>

Global $Handle[5]

For $n = 1 to 1

$Handle[$n] = RunWait("C:\Program Files (x86)\ABBYY FineReader 10\FineReader.exe")

Next

Sleep(1000)

WinActivate($Handle[$n],"")

WinActive($Handle[$n],"") ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

Send("!f")

Send("x")

Send("n")

Link to comment
Share on other sites

  • Moderators

OldMike,

This never activates / gives focus

Hardly surprising as RunWait will only return once the app ends - it is hanging at that point, not the Wait* commands. Try using plain old Run and see what happens. :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

RunWait = Runs an external program and pauses script execution until the program finishes.

It won't go past the first RunWait until you close that window.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

Small test program below. It will run one to "n" sessions and close them just fine, providing that once I launch it I touch nothing. If I click off an ABBYY window after they are launched but before they start the shutdown loop, then they do not get focus in spite of the WinWaitActive step. Once I took focus away, it was lost forever and the number of sessions builds without limit. This script will run on an unattended PC, but from time to time I need to log in (LogMeIn.com) and check that all is well, so when I do that I'm pretty sure it will lose focus and never regain it. But WinActivate is the only focus-giving command I can find, and I'm really puzzled why the test passes when focus has not really been gained.

#include<file.au3>

#Include<array.au3>

$NbrChannels = 3

opt("WinTitleMatchMode",-3)

opt("SendKeyDownDelay",1000)

opt("SenKeyDelay",2000)

Global $PnCount, $PdfCount, $fcnt[200], $OCRCount, $TITLE[5], $PDnHold[5], $Handle[5]

While 1=1

For $n = 1 to $NbrChannels

$Handle[$n] = Run("C:\Program Files (x86)\ABBYY FineReader 10\FineReader.exe")

Sleep(3000)

Next

Sleep(5000)

For $n = 1 To $NbrChannels

WinActivate($Handle[$n],"")

WinActive($Handle[$n],"") ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

Send("{ALTDOWN}")

Send("f")

Send("{ALTUP}")

Send("x")

Send("n")

Next

Wend ; Do forever

Link to comment
Share on other sites

  • Moderators

OldMike,

Try correcting the syntax: ;)

#include < file.au3 >
#include <array.au3>

$NbrChannels = 3

Opt("WinTitleMatchMode", -3)

Opt("SendKeyDownDelay", 1000)
Opt("SendKeyDelay", 2000) ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

Global $PnCount, $PdfCount, $fcnt[200], $OCRCount, $TITLE[5], $PDnHold[5], $Handle[5]

While 1 = 1

    For $n = 1 To $NbrChannels
        $Handle[$n] = Run("C:\Program Files (x86)\ABBYY FineReader 10\FineReader.exe")
        Sleep(3000)
    Next

    Sleep(5000)

    For $n = 1 To $NbrChannels

        WinActivate($Handle[$n], "")
        WinWaitActive($Handle[$n], "") ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
        Send("{ALTDOWN}")
        Send("f")
        Send("{ALTUP}")
        Send("x")
        Send("n")

    Next

WEnd ; Do forever

Also, when you post code please use Code tags. Put [autoit] before and [/autoit] after your posted code. :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Copied your code exactly, and inserted a msgbox to flag activation; it never activates, even if I touch nothing and the ABBYY window is on top. It does the same thing using Notepad instead of ABBYY; never gets past the WinWaitActive step.

#include < file.au3 >
#include <array.au3>

$NbrChannels = 1

Opt("WinTitleMatchMode", -3)

Opt("SendKeyDownDelay", 1000)
Opt("SendKeyDelay", 2000) ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

Global $PnCount, $PdfCount, $fcnt[200], $OCRCount, $TITLE[5], $PDnHold[5], $Handle[5]

While 1 = 1

    For $n = 1 To $NbrChannels
        $Handle[$n] = Run("C:\Program Files (x86)\ABBYY FineReader 10\FineReader.exe")
        Sleep(3000)
    Next

    For $n = 1 To $NbrChannels

        WinActivate($Handle[$n], "")
        WinWaitActive($Handle[$n], "") ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
        msgbox(0,"","Activated")
        Send("{ALTDOWN}")
        Send("f")
        Send("{ALTUP}")
        Send("x")
        Send("n")

    Next

WEnd ; Do forever
Edited by OldMike
Link to comment
Share on other sites

  • Moderators

OldMike,

I should have looked at your code more closely - what does the Help file tell you is returned by Run?

Answer: The PID, not the handle!

Let us go about this a different way. I only have the ABBYY FineReader 6.0 Sprint, which does not allow multiple instances, so you will have to bear with me if we do this in small steps.

Step 1: Launch your ABBYY app and use the Window Info tool to get the CLASS of the GUI - in my sprint version it is "FineSprintMainFrame"

Step 2: Try running this with your CLASS in place of mine:

#include <Array.au3>

$NbrChannels = 1

Global $PnCount, $PdfCount, $fcnt[200], $OCRCount, $TITLE[5], $PDnHold[5], $Handle[5]

While 1 = 1

    For $n = 1 To $NbrChannels
        $iPID = Run("C:\Program Files (x86)\ABBYY FineReader 10\FineReader.exe")
    Sleep(5000)
    Next

    $aWinList = WinList("[CLASS:FineSprintMainFrame]") ; <<<<< this is what you must set to the value from your GUI
    _ArrayDisplay($aWinList)

    For $n = 1 To $NbrChannels

        WinActivate($aWinList[$n][1])
        WinWaitActive($aWinList[$n][1])
        MsgBox(0,"","Activated")

    Next

WEnd ; Do forever

What we are doing is looking for all the windows of that class and then looping through them to activate them. As I said, I can only get the one instance running at a time and this works fine for me. Let me know how you get on. :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

First, let me say I REALLY appreciate your sticking with me. This doesn't look like much, but it is actually very important.

The class is: [FineReader10MainWindowClass]

And your script does go through and activate. I think next the variables need to be arrays. Also, I will need to launch them all, then close them. When that works as a loop, then I see if I can selectively shut down a specific session, not all and not the last one.

M

Link to comment
Share on other sites

  • Moderators

OldMike,

Ah, we are on the right track. :)

Now we need to open multiple versions of the app. I take it you want the apps opened and then focused one by one? If so then this should do the trick - not tested because I do not have the right ABBYY app:

#include <Array.au3>

$NbrChannels = 4

Global $PnCount, $PdfCount, $fcnt[200], $OCRCount, $TITLE[5], $PDnHold[5], $Handle[5]

;While 1 = 1

    For $n = 1 To $NbrChannels
        $iPID = Run("C:\Program Files (x86)\ABBYY FineReader 10\FineReader.exe")
    Sleep(5000)
    Next

    $aWinList = WinList("[CLASS:FineReader10MainWindowClass]") ; This gets us all the app handles in an array
    _ArrayDisplay($aWinList)

    For $n = 1 To $NbrChannels

        WinActivate($aWinList[$n][1])
        WinWaitActive($aWinList[$n][1])
        MsgBox(0,"","Activated")

    Next

;WEnd ; Do forever

That should open 4 instances of the app and then show you the ArrayDisplay dialog with the handles for their GUIs - you can move the ABBYY apps around so as to get them all visible at this point. Once you close the ArrayDisplay dialog the script should activate each ABBYY app in turn.

Standing by for the result - unless I gat called to the dinner table first. ;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Yep, just fine. But the biggie, now, is to be able to specify a given session and shut it down. The key strokes for shutdown are:

Send("!f"); Brings up File menu

Send("x"); Selects "eXit"

Send("n"); Replies "No" to question about saving.

So let's launch all four, then shut down #2.

I have four in folders (P1-P4) that I check to make sure there is something to do. If so, I move the PDFs in Pn to PDFn, which is where ABBYY will look, then launch the appropriate ABBYY session. SO the Handle subscript will be the same as "n" for Pn and PDFn. There are macros within ABBYY I select with keystrokes (which is working fine) and then I watch an output folder OCRn. When ABBYY is done, it dumps the results to OCRn. I compare the number of PDFs in OCRn to the number that was in Pn, and when they match I move them to an FTP_UP folder, delete what is in PDFn, and start over. In the past we have done nearly a million pages per day using VBScripts and a custom .EXE I had written for ABBYY8 (with lots of computers). But ABBYY10 throughput is 2X that of ABBYY8, and I cannot find the contractor that wrote the original controlling .EXE. Since the control key strokes are different between 10 and 8, I cannot use the old management program. So I tried VBS and it just couldn't cut it, so turned to AutoIT on advice from Experts-exchange.com. All the rest of the VBScripts take care of FTP, distributing files to be done and finished files. So the missing part is keeping ABBYY sessions moving. They generally do 50 in a batch, and it takes ten to fifteen minutes. So most of the time this program will just be watching for an ABBYY to finish, then reload and launch.

Link to comment
Share on other sites

  • Moderators

OldMike,

That will take a little bit of thought as the handles produced by WinList are ordered by creation. We will need to keep an eye on which ABBYY instance is running which PDF/OCRn folder. It looks as if we will need another array in which the handles are ordered by n so we know which handle to use.

I take it you know which of the 4 folders you are going to use before you launch the ABBYY instance to deal with the contents? That would be very useful to determine where the handle goes in the array. ;)

It is getting late here and I was up early this morning. I will ponder this overnight and get back to you tomorrow. :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Yes. I know ahead of time which to run. They all start up together, but over time will be completely random since they will rarely finish in order. So first start all four (one per core on a quad-core CPU), then a loop of:

For n = 1 to 4

Count of OCRn >0? If Yes, then

Loop until Count of OCRn = Count of Pn

Delete everything in PDFn

Move everything in OCRn to FTP_UP

Next; keep looping here until at least one OCR is non-zero, because we know all ABBYYs are running. So when at least one OCRn required service, then:

Check for any empty PDFn. If any found, check for count of Pn >0. If so, move contents of Pn to PDFn, and launch ABBYYn, recording the count of Pn for later "done" test.

Now back to check for OCRs >0. I suppose instead of polling I could keep track of which "n"s are running, but the overhead is mice nuts on a fifteen minute cycle time.

All of this is working fine in my AutoIT program. The whole issue was being able to get focus to ABBYYn, then send it key strokes to shut it down, then later on launch ABBYYn.

Are you in Europe? You seem to be much more than three time zones ahead of me.

Edited by OldMike
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...