Jump to content

Splash prbl


duhu
 Share

Recommended Posts

I have a problem with a splsh text.I call an vbs script that defrag the hdd and I want the splash to stay until the script finishes.I tried this but it doesn work:

func defragpressed()

SplashTextOn ( "XP-tools kit v1.0", "Asteapta !!!", 300, 100, -1, -1, 0, "Comic Sans MS Bold", "14" )

RunWait(@ComSpec & " /c " & 'start /min data\Def.vbs', "", @SW_HIDE)

SplashOff ( )

Endfunc

Link to comment
Share on other sites

And another question: How can i add multiple text lines to an textslash

Ex:    

              this is a splash

This window is called splash

Bla bla bla

blabla

<{POST_SNAPBACK}>

have you tried concatenating @CR @LF or @CRLF to your string?

$blah = "this is first line" & @CR & "This is second" & @CRLF & "this is third"
Edited by cameronsdad
Link to comment
Share on other sites

Heres a more explained version of my question:When the vbs script start it starts 2 processes (i saw that in task manager) defrag.exe , dfrgntfs.exe.Now....i need the splash to stay (it say Pls wait, in romanian) until the defrag is over, because when the defragmentation process is over the 2 processes defrag.exe , dfrgntfs.exe, closes, so i think i can use the ProcessWaitClose comms to make the splash stay until the defrag is over, but i dont know what to do with that psapi.dll in order to get the ProcessWaitClose comm to work.

pls help

thx and srry for my eng if its bad

Link to comment
Share on other sites

Awww... who needs Vbs....lol

This will do the trick... (tested on win Xp)

func defragpressed()
SplashTextOn ( "XP-tools kit v1.0", "Asteapta !!!", 300, 100, -1, -1, 0, "Comic Sans MS Bold", "14" )
;RunWait(@ComSpec & " /c " & 'start /min data\Def.vbs', "", @SW_HIDE)
$PID = Run("mmc Dfrg.msc", @SystemDir)
WinWaitActive("")
Sleep(300)
Send("!A")
Sleep(100)
Send("D")
;bla...bla
;more controls etc
ProcessWaitClose($PID)
SplashOff ( )
Endfunc

Hope it helps

8)

Edited by Valuater

NEWHeader1.png

Link to comment
Share on other sites

RunWait(@ComSpec & " /c " & 'start /w /min data\Def.vbs', "", @SW_HIDE)

Any better? (Note the /w switch which informs the interpreter to wait until the called program finishes.)

Edited by LxP
Link to comment
Share on other sites

Instead of using start, use cscript.exe

RunWait(@ComSpec & " /c " & "cscript.exe data\Def.vbs", "", @SW_HIDE)

Cscript.exe will run inside this hidden ComSpec window.

...or better yet...

RunWait(@SystemDir & "\cscript.exe /nologo " & @ScriptDir & "\data\Def.vbs")

Also, vbs is associated with Wscript by default in XP, so the user will get popup windows for errors. Force it to use cscript to avoid these.

My UDFs: ExitCodes

Link to comment
Share on other sites

Yours,(Valuater) and the other1...i'll test it now.

<{POST_SNAPBACK}>

works on mine (win Xp)

I copied this line

$PID = Run("mmc Dfrg.msc", @SystemDir)

straight from my *XPClean Menu* (as noted below) and over 7,000 people are using it???????

That didnt work! its start Diskeeper.

go figure

8)

PS... with that said.... I just got my sixth "star" from Autoit (upper left corner)

Edited by Valuater

NEWHeader1.png

Link to comment
Share on other sites

ive got it to work using this:

func defragpressed()

SplashTextOn ( "XP-tools kit v1.0", "Asteapta !!!", 300, 100, -1, -1, 0, "Comic Sans MS Bold", "14" )

$PID = RunWait(@ComSpec & " /c " & 'start /w /min data\Def.vbs', "", @SW_HIDE)

WinWaitActive("")

ProcessWaitClose($PID)

SplashOff ( )

Endfunc

thx @Lxp

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