duhu Posted August 17, 2005 Share Posted August 17, 2005 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 More sharing options...
duhu Posted August 17, 2005 Author Share Posted August 17, 2005 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 Link to comment Share on other sites More sharing options...
seandisanti Posted August 17, 2005 Share Posted August 17, 2005 (edited) And another question: How can i add multiple text lines to an textslashEx: this is a splashThis window is called splashBla bla blablabla<{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 August 17, 2005 by cameronsdad Link to comment Share on other sites More sharing options...
duhu Posted August 17, 2005 Author Share Posted August 17, 2005 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 More sharing options...
Valuater Posted August 18, 2005 Share Posted August 18, 2005 (edited) 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 August 18, 2005 by Valuater Link to comment Share on other sites More sharing options...
LxP Posted August 18, 2005 Share Posted August 18, 2005 (edited) 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 August 18, 2005 by LxP Link to comment Share on other sites More sharing options...
duhu Posted August 18, 2005 Author Share Posted August 18, 2005 That didnt work! its start Diskeeper.is there anyway how to use that vbs script? Link to comment Share on other sites More sharing options...
Valuater Posted August 18, 2005 Share Posted August 18, 2005 what script didn't work ? 8) Link to comment Share on other sites More sharing options...
duhu Posted August 18, 2005 Author Share Posted August 18, 2005 Yours,(Valuater) and the other1...i'll test it now. Link to comment Share on other sites More sharing options...
Gigglestick Posted August 18, 2005 Share Posted August 18, 2005 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 More sharing options...
Valuater Posted August 18, 2005 Share Posted August 18, 2005 (edited) 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 figure8)PS... with that said.... I just got my sixth "star" from Autoit (upper left corner) Edited August 18, 2005 by Valuater Link to comment Share on other sites More sharing options...
duhu Posted August 18, 2005 Author Share Posted August 18, 2005 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now