Page 1 of 1 1
Topic Options
#212373 - 2017-03-24 02:58 PM Need simple Pop Up WITH NO user input ability
FredR Offline
Just in Town

Registered: 2017-03-24
Posts: 2
Loc: NY, USA
Hey Guys,
I am trying to write a simple Pop up WAIT message, simple stating do not do anything until this box disappears..
while another process runs in the back ground.. once my OTHER process completes it kills the kix process and the window goes away, I DONT want to have any user input buttons, i.e. OK, Cancel,yes no, etc...
I have a pop up now, that displays the RED X and my message BUT it also shows an OK button, how do I get rid of any input buttons please help, need answer ASAP


Edited by FredR (2017-03-24 03:00 PM)
Edit Reason: messed up

Top
#212374 - 2017-03-24 03:10 PM Re: Need simple Pop Up WITH NO user input ability [Re: FredR]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
Below is an example using notepad as "the proccess". It requires kixforms.net on each system running the script. Things like MessageBox cannot do this. Messagebox requires at least one button. Off course you could catch the action when the button is pressed and do nothing with that but it is not input free.

 Code:
Break On
$System = CreateObject("Kixforms.System")
If Not $System
   $nul= MessageBox("KiXforms.Net Not Initiated. This Script Will Now Close.","Error",16)
   Quit()
EndIf
$nul = $System.Application.EnableVisualStyles

$Form1 = $System.Form()
$Form1.ControlBox = 0  ;false
$Form1.StartPosition = 1
$Form1.Size = $System.Size(301,102) ;(Width,Height)
$Form1.Text = "Form1"

$Label1 = $System.Label()
$Label1.BorderStyle = 1  ;FixedSingle
$Label1.Left = 10
$Label1.Text = "Hello, please wait for the proccess to complete."
$Label1.Top = 20
$Label1.Width = 260
$nul = $Form1.Controls.Add($Label1)

$Form1.Show  ;Displays the Form
StartNotepad()

While $Form1.Visible
   $Nul = Execute($Form1.DoEvents())
Loop
Exit 0

Function StartNotepad()
	;use Run to start notepad and continue to the next command
	;Run "Notepad.exe"
		
	;Use Shell to start notepad, wait for notepad to close and continue to the next command
	Shell "Notepad.exe"
	Sleep 10
	Quit
EndFunction


Edited by Mart (2017-03-24 03:14 PM)
Edit Reason: small typo in the code
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#212375 - 2017-03-24 05:58 PM Re: Need simple Pop Up WITH NO user input ability [Re: Mart]
FredR Offline
Just in Town

Registered: 2017-03-24
Posts: 2
Loc: NY, USA
Thanks so much for your super quick reply..
I have never used Kixforms, is it an installer?
Does Kix have to be on the machine too??
if its installed, how do I call the script you posted from kixforms?

Fred

Top
#212376 - 2017-03-24 09:43 PM Re: Need simple Pop Up WITH NO user input ability [Re: FredR]
ShaneEP Moderator Offline
MM club member
*****

Registered: 2002-11-29
Posts: 2127
Loc: Tulsa, OK
Kixforms.net has an MSI installer. Once installed, you don't have to do anything else with kixforms. The kix script invokes the library using the line "$System = CreateObject("Kixforms.System")".
Top
#212377 - 2017-03-24 10:16 PM Re: Need simple Pop Up WITH NO user input ability [Re: ShaneEP]
ShaneEP Moderator Offline
MM club member
*****

Registered: 2002-11-29
Posts: 2127
Loc: Tulsa, OK
You could always use IE, or the console itself, if you just want to make them wait.

Here's a short example using IE...
 Code:
$html = "<center><b>PLEASE WAIT...</b></center>"

$IE = CreateObject("InternetExplorer.Application")
$IE.navigate("about:blank")
While $IE.busy AND $IE.readystate<>4 AND @error=0 Loop

$IE.document.body.innerHTML = $html
$IE.AddressBar = 0
$IE.Toolbar = 0
$IE.MenuBar = 0
$IE.Resizable = 0
$IE.Silent = 1
$IE.StatusBar = 0
$IE.FullScreen = 1
$IE.Visible = 1

Sleep 3

$IE.Quit
$IE = 0

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 687 anonymous users online.
Newest Members
ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder, M_Moore
17887 Registered Users

Generated in 0.06 seconds in which 0.03 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org