Jump to content

Recommended Posts

  • Moderators
Posted

ahmeddzcom,

You can only have one splash screen at any one time - so you cannot display both together. :(>

Why do you need 2 splash screens? Are you trying to notify 2 separate things? If so then perhaps my Notify UDF might be useful - look in my sig for the link. ;)

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:

  Reveal hidden contents

 

Posted

BTW, your While loops aren't needed. You're not looping, so putting the commands into a loop makes no sense.

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!

  Reveal hidden contents

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

  • Moderators
Posted (edited)
  On 12/2/2014 at 7:15 PM, BrewManNH said:

BTW, your While loops aren't needed. You're not looping, so putting the commands into a loop makes no sense.

2nd loop is ;)

Edit:

This could be done like this:

1.  Create a separate script that does the SplashText

2.  Use Run + ScriptFullPath + AutoIt3ExecuteScript + ScriptPathName + any command lines you want to pass

You could create hidden GUI control(s), use these controls to set a value that the other script could read.

Then you could pass the GUI hwnd (as a number and convert to hwnd in the SplashText script), the control id number, and all the parameters that splashtext function accepts.

In a loop, you could check to see if the value is set in the hwnd+controlid, if it is, run the splash text, if it isn't, close the splashtext with splashoff.

Sounds harder than it would be.

Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Posted
  On 12/2/2014 at 6:12 PM, Melba23 said:

You can only have one splash screen at any one time - so you cannot display both together. :(>

 
  On 12/2/2014 at 7:15 PM, BrewManNH said:

BTW, your While loops aren't needed. You're not looping, so putting the commands into a loop makes no sense.

 
 
  On 12/2/2014 at 7:31 PM, SmOke_N said:

2nd loop is  ;)

 

 

Tnx guys

Posted (edited)

... a little trick ...

$code1 = "while 1" & @CRLF & "SplashTextOn('', '1', 100, 80, 5, 5, 50, '', 20)" & @CRLF & "sleep(2000)" & @CRLF & "SplashOff()" & @CRLF & "WEnd"
$code2 = "while 1" & @CRLF & "SplashTextOn('', '2', 100, 80, 125, 5, 50, '', 20)" & @CRLF & "sleep(2000)" & @CRLF & "SplashOff()" & @CRLF & "WEnd"
_ExecuteScript($code1, $code2)
MsgBox(0, "Info", "the 2 Splash are running in 2 endless separate tasks")
Exit

Func _ExecuteScript($code1, $code2)
    Local $tmp1 = @TempDir & "\tempexec1.tmp"
    Local $tmp2 = @TempDir & "\tempexec2.tmp"
    Local $hwnd = FileOpen($tmp1, 26)
    FileWrite($hwnd, $code1)
    FileClose($hwnd)
    $hwnd = FileOpen($tmp2, 26)
    FileWrite($hwnd, $code2)
    FileClose($hwnd)
    $pid1 = Run('"' & @AutoItExe & '" /AutoIt3ExecuteScript "' & $tmp1 & '"')
    $pid2 = Run('"' & @AutoItExe & '" /AutoIt3ExecuteScript "' & $tmp2 & '"')
EndFunc   ;==>_ExecuteScript
Edited by Chimp

 

image.jpeg.9f1a974c98e9f77d824b358729b089b0.jpeg Chimp

small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....

  • Moderators
Posted

I see Chimp understood what I was talking about.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Posted (edited)
  On 12/3/2014 at 12:16 AM, Chimp said:

 

... a little trick ...

$code1 = "while 1" & @CRLF & "SplashTextOn('', '1', 100, 80, 5, 5, 50, '', 20)" & @CRLF & "sleep(2000)" & @CRLF & "SplashOff()" & @CRLF & "WEnd"
$code2 = "while 1" & @CRLF & "SplashTextOn('', '2', 100, 80, 125, 5, 50, '', 20)" & @CRLF & "sleep(2000)" & @CRLF & "SplashOff()" & @CRLF & "WEnd"
_ExecuteScript($code1, $code2)
MsgBox(0, "Info", "the 2 Splash are running in 2 endless separate tasks")
Exit

Func _ExecuteScript($code1, $code2)
    Local $tmp1 = @TempDir & "\tempexec1.tmp"
    Local $tmp2 = @TempDir & "\tempexec2.tmp"
    Local $hwnd = FileOpen($tmp1, 26)
    FileWrite($hwnd, $code1)
    FileClose($hwnd)
    $hwnd = FileOpen($tmp2, 26)
    FileWrite($hwnd, $code2)
    FileClose($hwnd)
    $pid1 = Run('"' & @AutoItExe & '" /AutoIt3ExecuteScript "' & $tmp1 & '"')
    $pid2 = Run('"' & @AutoItExe & '" /AutoIt3ExecuteScript "' & $tmp2 & '"')
EndFunc   ;==>_ExecuteScript

 Yeaaa  ... This   :thumbsup:  . Tnx Chimp 

     But not Run After Compile  o:)  :geek: 

Edited by ahmeddzcom
Posted (edited)
  On 12/3/2014 at 12:56 AM, SmOke_N said:

I see Chimp understood what I was talking about.

 

:graduated:

  Reveal hidden contents

Edited by Chimp

 

image.jpeg.9f1a974c98e9f77d824b358729b089b0.jpeg Chimp

small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....

Posted

If it is only two splash screens you are concerned over, then simple updating the one splash screen at regular intervals, with either message, should be good enough. Using the Adlib functions (perhaps) or one main Loop, etc.

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

  Reveal hidden contents

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

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
  • Recently Browsing   0 members

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