Jump to content

process shower


usera
 Share

Recommended Posts

Greeting,

I got 600 lines command like shellexecute command in an au3 file, and they all works fine.

I am looking for easy way to show the information:

like when working in first shellexecute command show something like "working in 1/600". then the second one show "working in 2/600" ...

thanks

usera

Link to comment
Share on other sites

tooltips?

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Link to comment
Share on other sites

Hello usera,

iamtheky was suggesting the use of ToolTip()

Example:

ToolTip( $line & " of 600",$x,$y,"Working Application")

My Contributions: Unix Timestamp: Calculate Unix time, or seconds since Epoch, accounting for your local timezone and daylight savings time. RegEdit Jumper: A Small & Simple interface based on Yashied's Reg Jumper Function, for searching Hives in your registry. 

Link to comment
Share on other sites

ToolTip ( "text" [, x [, y [, "title" [, icon [, options]]]]] )

Help file.

Also, if this is something where you are wishing the user to not use the computer, you can always use Splash Text/Image:

SplashImageOn ( "title", "file" [, width [, height [, x pos [, y pos [, opt]]]]] )
SplashTextOn ( "title", "text" [, w [, h [, x pos [, y pos [, opt [, "fontname" [, fontsz [, fontwt ]]]]]]]] )
Edited by Affe

[center][/center]

Link to comment
Share on other sites

hit the "splash image with Marquee" link in my sig.

It has tooltips in action.

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Link to comment
Share on other sites

Hello usera,

iamtheky was suggesting the use of ToolTip()

Example:

ToolTip( $line & " of 600",$x,$y,"Working Application")

Thanks Realm,

ToolTip is very good, I want to use that way, but the question is how can I implement it

say for code:

ToolTip( $line & " of 600",$x,$y,"Working Application")

Where I need it in my code now, my code like below:

shellexecute ("APP1")

Shellexecute ("APP2")

Shellexecute ("APP3")

Shellexecute ("APP4")

.

.

.

.

Shellexecute ("APP600")

where I put the code: ToolTip( $line & " of 600",$x,$y,"Working Application") ?

between

shellexecute ("APP1")

Shellexecute ("APP2") ???

then increate $line?

Thanks

usera

Link to comment
Share on other sites

usera,

What I would do in a case like this is create a text file listing the applications you want to run in the order you want to run, creating a newline for each application

Example:

C:\ProgramFiles\Application1.exe

C:\ProgramFiles\Application2.exe

C:\ProgramFiles\Application3.exe

C:\ProgramFiles\Application4.exe

C:\ProgramFiles\Application5.exe

C:\ProgramFiles\Application6.exe

C:\ProgramFiles\Application7.exe

Then I would open in a loop that will also help with your tooltip, and create a lot less code to write:

Local $appFile = @MyDocumentsDir & "\ApplicationList.txt"  ;change the path to which your application list is saved.
Local $tool_Coord_X = 0 ;leaveing both of these at '0' will place the tooltip on the cursor
Local $tool_Coord_Y = 0 ;change the X and/or Y if you want it in a locked location
_FileReadToArray($appFile,$app_List) ;Read the application file into an array.

For $app = 1 To $app_List[0]
    ToolTip( $app & " of " & $app_List[0],$x,$y,"Processing Application List")
    ShellExecute($app_List[$app])
    Sleep(60000) ;this will pause giving the application 60 seconds to startup
    ;you may adjust the sleep to fit the average need of the applications.
Next
ToolTip('') ;this will close the ToolTip

Warning: This will open every program very fast without the Sleep(), this could cause alot of problems on Memory and your CPU, you might want to use ShellExecuteWait() which will allow the first application to run and close, before it attempts to open the 2nd application. If its just a handfull of programs to run then I would suggest adding a Sleep() inside the loop, As I included above, giving each application time to startup before running the next.

Realm

Edited by Realm

My Contributions: Unix Timestamp: Calculate Unix time, or seconds since Epoch, accounting for your local timezone and daylight savings time. RegEdit Jumper: A Small & Simple interface based on Yashied's Reg Jumper Function, for searching Hives in your registry. 

Link to comment
Share on other sites

Thanks Realm,

You are the Real Man.

Thank you very much!

usera

usera,

What I would do in a case like this is create a text file listing the applications you want to run in the order you want to run, creating a newline for each application

Example:

Then I would open in a loop that will also help with your tooltip, and create a lot less code to write:

Local $appFile = @MyDocumentsDir & "\ApplicationList.txt"  ;change the path to which your application list is saved.
Local $tool_Coord_X = 0 ;leaveing both of these at '0' will place the tooltip on the cursor
Local $tool_Coord_Y = 0 ;change the X and/or Y if you want it in a locked location
_FileReadToArray($appFile,$app_List) ;Read the application file into an array.

For $app = 1 To $app_List[0]
    ToolTip( $app & " of " & $app_List[0],$x,$y,"Processing Application List")
    ShellExecute($app_List[$app])
    Sleep(60000) ;this will pause giving the application 60 seconds to startup
    ;you may adjust the sleep to fit the average need of the applications.
Next
ToolTip('') ;this will close the ToolTip

Warning: This will open every program very fast without the Sleep(), this could cause alot of problems on Memory and your CPU, you might want to use ShellExecuteWait() which will allow the first application to run and close, before it attempts to open the 2nd application. If its just a handfull of programs to run then I would suggest adding a Sleep() inside the loop, As I included above, giving each application time to startup before running the next.

Realm

Link to comment
Share on other sites

RunWait might be a better way to go than ShellExecute?

I agree with that, but I had a feeling that he might be opening texts into an editor or another application, in which Shell would be more useful function.

Realm

Edit: I should have said something to that fact when providing an example, thanks for stepping up JoHanatCent ;)

Edited by Realm

My Contributions: Unix Timestamp: Calculate Unix time, or seconds since Epoch, accounting for your local timezone and daylight savings time. RegEdit Jumper: A Small & Simple interface based on Yashied's Reg Jumper Function, for searching Hives in your registry. 

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...