Jump to content
Sign in to follow this  
LetsAuto

assigning information from a .txt to a disabled input box

Recommended Posts

LetsAuto

Hi! So im at a point where I can comfortably use the Koda interface, and i can manage my programs.. BUT..... i need information from a log file to be displayed in a disabled input box (so that way the user has no control over the content that is displayed)..... how does one do this?

Note: I already have the .txt file, with the user input.. that part was easy.. but i just dont know how to retrieve it.. its going to be something with FileReadLine(), yes?

Share this post


Link to post
Share on other sites
BrewManNH

$sText = FileRead("your text file")

GUICtrlSetData($yourEditControl, $sText)


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!

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

Share this post


Link to post
Share on other sites
LetsAuto

so this....

$sText = FileRead("C:IanLogTestbuildTester.log")
GUICtrlSetData($productDestination, $sText)

... should be displaying whatever is in that .log file, correct?

Share this post


Link to post
Share on other sites
BrewManNH

Yes, if there's something in the text file, and if $productDestination is the handle to your control it should display it in the control.


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!

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

Share this post


Link to post
Share on other sites
JScript

Yes, if there's something in the text file, and if $productDestination is the handle to your control it should display it in the control.

I think you meant the control identifier (controlID), not handle, I'm right?

JS


http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!)

Somewhere Out ThereJames Ingram

somewh10.png

dropbo10.pngDownload Dropbox - Simplify your life!
Your virtual HD wherever you go, anywhere!

Share this post


Link to post
Share on other sites
BrewManNH

Either is appropriate, depending on how the control was created.


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!

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

Share this post


Link to post
Share on other sites
BrewManNH

Whatever, to me the 2 are practically interchangable. It's all semantics anyways. To be 100% correct, you'd be right, but I've seen most people rarely differentiate between the 2.


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!

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

Share this post


Link to post
Share on other sites
LetsAuto

so either way, if that log file has the word "fish" on the first line.. the product destination label should be displaying the word "fish"?

Share this post


Link to post
Share on other sites
LetsAuto

In the au3 script that has the user input data this is my code...

$text = InputBox("Build Data", "Please input product build number.")

FileDelete("C:IanLogTestbuildTester.log")
$logdir = "C:IanLogTest"
$logfile = $logdir & "buildTester.log"
$screenshot = 0
$module = "Initial"
$file = FileOpen($logfile, 9)
;;;;works and saves variable to log;;;;
FileWriteLine($file, $text)
FileWriteLine($file, @CRLF)
FileClose($file)

... and then to call that text i use...

$sText = FileReadLine("C:IanLogTestbuildTester.log")
 GUICtrlSetData($productDestination, $sText)

... and nothing happens.. after running the code the label remains empty

Share this post


Link to post
Share on other sites
BrewManNH

What label? I don't see any label in that code. Perhaps you should post a working script that demonstrates the problem rather than bits and pieces that have nothing to do with the issue you're asking about.


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!

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

Share this post


Link to post
Share on other sites
LetsAuto

#include 
#include 
#include 
#include 
#include 
#include 

; Force close with CTRL-Q
HotKeySet("^q", "stop")
Func stop()
Exit
EndFunc ;==>stop

#Region ### START Koda GUI section ### Form=
$Form = GUICreate("Finalizing Installation", 508, 488, -1245, 273)
$titleLabel = GUICtrlCreateLabel("Setup Information", 32, 40, 132, 24)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
$finishButton = GUICtrlCreateButton("&Finish", 208, 416, 75, 33)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
$backButton = GUICtrlCreateButton("&Back", 304, 416, 75, 33)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
$brandLabel = GUICtrlCreateLabel("Brand:", 48, 128, 51, 24)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
$brandDestination = GUICtrlCreateInput("", 152, 120, 81, 28)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
GUICtrlSetState(-1, $GUI_DISABLE)
$buildLabel = GUICtrlCreateLabel("Product Build:", 48, 88, 102, 24)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
$productDestination = GUICtrlCreateInput("", 152, 80, 81, 28)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
GUICtrlSetState(-1, $GUI_DISABLE)
$functionsList = GUICtrlCreateList("", 48, 192, 145, 149)
GUICtrlSetState(-1, $GUI_DISABLE)
$functionsLabel = GUICtrlCreateLabel("Selected Functions:", 48, 160, 145, 24)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
$ipList = GUICtrlCreateList("", 304, 192, 145, 149)
GUICtrlSetState(-1, $GUI_DISABLE)
$ipLabel = GUICtrlCreateLabel("Selected IPs:", 304, 160, 98, 24)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
$buildButton = GUICtrlCreateButton("Change Build and Brand", 256, 92, 193, 41)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
$functionsButton = GUICtrlCreateButton("Change Functions", 48, 344, 145, 33)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
$ipButton = GUICtrlCreateButton("Change IPs", 304, 344, 145, 33)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
GUISetState(@SW_SHOW)
$cancelButton = GUICtrlCreateButton("Cancel", 400, 416, 75, 33)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
#EndRegion ### END Koda GUI section ###

While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $buildButton
Run("C:Program FilesAutoIt3AutoIt3.exe F:AutoIt3testingsautoWizardstep1.au3")
$handle = WinGetHandle("Untitled - AutoIt", "")
WinClose($handle)
Case $functionsButton
Run("C:Program FilesAutoIt3AutoIt3.exe F:AutoIt3testingsautoWizardstep2.au3")
$handle = WinGetHandle("Untitled - AutoIt", "")
WinClose($handle)
Case $ipButton
Run("C:Program FilesAutoIt3AutoIt3.exe F:AutoIt3testingsautoWizardstep3.au3")
$handle = WinGetHandle("Untitled - AutoIt", "")
WinClose($handle)
Case $backButton
Run("C:Program FilesAutoIt3AutoIt3.exe F:AutoIt3testingsautoWizardstep3.au3")
$handle = WinGetHandle("Untitled - AutoIt", "")
WinClose($handle)
Case $finishButton
$handle = WinGetHandle("Untitled - AutoIt", "")
WinClose($handle)
Case $cancelButton
$handle = WinGetHandle("Untitled - AutoIt", "")
WinClose($handle)
EndSwitch
WEnd


$sText = FileReadLine("C:IanLogTestbuildTester.log")
GUICtrlSetData($productDestination, $sText)

.... sorry i used koda to make the interface. everything works (buttons are the only thing so far), they wont work because all of the file paths are set to my computer, as you could figure out..

Share this post


Link to post
Share on other sites
LetsAuto

Never mind guys, I figured it out after playing with a message box.. i just had to specify in the #Region stuff from koda where to put it... thanks for all your help!

Share this post


Link to post
Share on other sites
LetsAuto

here is what i did...

$text = FileReadLine("C:IanLogTestbuildTester.log")
MsgBox("text read", "Reads a log file", $text)

... intead of using the...

[color=#000000][font=monospace][size=2][background=rgb(248, 248, 248)] [/background][/size][/font][/color][url="http://www.autoitscript.com/autoit3/docs/functions/GUICtrlSetData.htm"][color=#000090]GUICtrlSetData[/color][/url][color=#FF8000][font=monospace][size=2]([/size][/font][/color][color=#5A5A5A][font=monospace][size=2]$productDestination[/size][/font][/color][color=#FF8000][font=monospace][size=2],[/size][/font][/color][color=#000000][font=monospace][size=2][background=rgb(248, 248, 248)] [/background][/size][/font][/color][color=#5A5A5A][font=monospace][size=2]$sText[/size][/font][/color][color=#FF8000][font=monospace][size=2])[/size][/font][/color]

...line, I just made a practice program with a message box and just applied it to the actual GUI script i posted previously

Share this post


Link to post
Share on other sites
JScript

Whatever, to me the 2 are practically interchangable. It's all semantics anyways. To be 100% correct, you'd be right, but I've seen most people rarely differentiate between the 2.

Run this example:

#include <GUIConstantsEx.au3>

_Example()

Func _Example()
    Local $iCtrlID, $hCtrlHwnd

    GUICreate("My GUI Button", 320, 240) ; will create a dialog box that when displayed is centered

    $iCtrlID = GUICtrlCreateButton("Ctrl ID", 50, 100, 100)

    $hCtrlHwnd = GUICtrlCreateButton("Ctrl Hwnd", 170, 100, 100)
    $hCtrlHwnd = GUICtrlGetHandle($hCtrlHwnd)

    GUISetState() ; will display an  dialog box with 2 button

    ; Run the GUI until the dialog is closed
    While 1
        Switch GUIGetMsg()
            Case $GUI_EVENT_CLOSE
                ExitLoop
            Case $iCtrlID
                MsgBox(4096, "ControlID", "Control ID: " & $iCtrlID)
            Case $hCtrlHwnd
                MsgBox(4096, "Handle", "Control handle: " & $hCtrlHwnd)
        EndSwitch
    WEnd
EndFunc   ;==>Example

That's what I tell...

JS


http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!)

Somewhere Out ThereJames Ingram

somewh10.png

dropbo10.pngDownload Dropbox - Simplify your life!
Your virtual HD wherever you go, anywhere!

Share this post


Link to post
Share on other sites
BrewManNH

Look, I KNOW the difference between a handle and a control ID, I don't need your explanation. I explained what I meant and if you're determined to "win" this, then fine, you've won, you're the greatest programmer ever, now drop it.


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!

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

Share this post


Link to post
Share on other sites
nitekram

OK - I will ask the question then, as I ran @JScript and nothing happened when I pressed the handle button. If I comment out this line

$hCtrlHwnd = GUICtrlGetHandle($hCtrlHwnd) it works fine. I guess I do not know the difference.

Not trying to add fuel to the fire - just want to know.


All by me:

"Sometimes you have to go back to where you started, to get to where you want to go." 

"Everybody catches up with everyone, eventually" 

"As you teach others, you are really teaching yourself."

From my dad

"Do not worry about yesterday, as the only thing that you can control is tomorrow."

 

WindowsError.gif

WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF

AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send

StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2

AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit  Docs

SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF

Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language

Programming Tips

Excel Changes

ControlHover.UDF

GDI_Plus

Draw_On_Screen

GDI Basics

GDI_More_Basics

GDI Rotate

GDI Graph

GDI  CheckExistingItems

GDI Trajectory

Replace $ghGDIPDll with $__g_hGDIPDll

DLL 101?

Array via Object

GDI Swimlane

GDI Plus French 101 Site

GDI Examples UEZ

GDI Basic Clock

GDI Detection

Ternary operator

Share this post


Link to post
Share on other sites
BrewManNH

It's because the script, as written, doesn't work.

This works as it's supposed to.

#include <GUIConstantsEx.au3>

_Example()

Func _Example()
Local $iCtrlID, $hCtrlHwnd

GUICreate("My GUI Button", 320, 240) ; will create a dialog box that when displayed is centered

$iCtrlID = GUICtrlCreateButton("Ctrl ID", 50, 100, 100)

$CtrlHwnd = GUICtrlCreateButton("Ctrl Hwnd", 170, 100, 100)
$hCtrlHwnd = GUICtrlGetHandle($CtrlHwnd)

GUISetState() ; will display an dialog box with 2 button

; Run the GUI until the dialog is closed
While 1
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE
ExitLoop
Case $iCtrlID
MsgBox(4096, "ControlID", "Control ID: " & $iCtrlID)
Case $CtrlHwnd
MsgBox(4096, "Handle", "Control handle: " & $hCtrlHwnd)
EndSwitch
WEnd
EndFunc ;==>Example

p.s. It helps to know the difference in how functions work with control handles versus control IDs. The original script won't work because he wrote it trying to get it to action on a handle and that won't work with GUIGetMsg, you need the CID.

Edited by BrewManNH

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!

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

Share this post


Link to post
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
Sign in to follow this  

  • Similar Content

    • dadalt95
      By dadalt95
      Hi!
      I want to get the signal in this website:
      https://binary-signal.com/pt/chart/eurusd
      I have tried using _IEBodyReadText  and some _StringBetween. What happens is that the text are being update every tick and _IEBodyReadText doesn't.
      To perform the update I used  _IEAction($oIE, "refresh") but it's not good because the website block me after some time due too many requests..
      Is there any other way to get this text every tick?
      PS: The text I want to get is WAIT, CALL or PUT.
       
      Here is the code:
      global $oIE = _IECreate ('https://binary-signal.com/pt/chart/eurusd', 0, 1 , 1 , 0) Local $sText = _IEBodyReadText($oIE) $result = _StringBetween ( $sText , 'PUTEUR/USD on Binary-signal.com', 'sinal está PRONTA') ;MsgBox ( 0, "asf", $result[0]) $espera=StringInStr($result[0], "WAIT") $compra=StringInStr($result[0], "CALL") $venda=StringInStr($result[0], "PUT") ;MsgBox($MB_SYSTEMMODAL, "", $espera) $n=0 $c=0 Captar() Func Captar() ;_IENavigate($oIE, "https://binary-signal.com/pt/chart/eurusd") ;MsgBox($MB_SYSTEMMODAL, "", $n) Local $sText = _IEBodyReadText($oIE) $result = _StringBetween ( $sText , 'PUTEUR/USD on Binary-signal.com', 'sinal está PRONTA') If (Not $compra=0) And $n=0 Then MsgBox($MB_SYSTEMMODAL, "", "COMPRE") $n=1 $c=$c+1 ;_IEAction($oIE, "refresh") Sleep(60000) Captar() ElseIf (Not $venda=0) And $n=0 Then MsgBox($MB_SYSTEMMODAL, "", "VENDA") $c=$c+1 $n=1 ;_IEAction($oIE, "refresh") ;MsgBox($MB_SYSTEMMODAL, "", $n) Sleep(60000) Captar() ElseIf (Not $venda=0) And $n=1 Then ;MsgBox($MB_SYSTEMMODAL, "", "Esperando próxima rodada") $n=1 ;MsgBox($MB_SYSTEMMODAL, "", $n) ;_IEAction($oIE, "refresh") Sleep(60000) Captar() ElseIf (Not $venda=0) And $n=1 Then ;MsgBox($MB_SYSTEMMODAL, "", "Esperando próxima rodada") $n=1 ;MsgBox($MB_SYSTEMMODAL, "", $n) ;_IEAction($oIE, "refresh") Sleep(60000) Captar() Else ;MsgBox("", "", "ESPERE") $n=0 Sleep(1000) ;_IEAction($oIE, "refresh") Local $sText = _IEBodyReadText($oIE) $result = _StringBetween ( $sText , 'PUTEUR/USD on Binary-signal.com', 'sinal está PRONTA') Captar() EndIf EndFunc  
    • Reziskonh
      By Reziskonh
      Hi, everybody
      I look for GUI whose behavior similar to the message of an email client or antivirus
      In other words:
          Any PC screen able to calculate the size
          To consider the Task bar size
          To find the lower corner on the right/below and to nestle on it

      Notes:
      In GUI the GUICtrlCreateEdit field (as option) - that can be received and displayed through variable information
      Thanks a lot
      PS
      I use the translator, excuse if something is not clear
       

    • VollachR
      By VollachR
      Hi,
      I'd like to show a progress bar for an operation performed by an external program my script is running silently, I want to show it in a GUI I created using the GUICtrlCreateProgress but I have no idea how to do it.
      The important thing to point out is that there's no way of knowing how long the external program will run, as it is a file splitter and it depends on the size of file it splits and the split parts size.
      Can someone point me in the right direction or give me an example how to do so?
      This is my RunWait command:
      RunWait($MYFILES1 & '\fsplit.exe -split ' & $Size & ' mb ' & $File & " -f " & $File & "." & $extension) It uses multiple variables declared and set earlier in the script, how will I got about having the progress of that command shown using GUICtrlCreateProgress ? Is it possible?
      Thank you.
    • nacerbaaziz
      By nacerbaaziz
      Hello my friends
      I have an inquiry and I hope to find the answer here
      I want to create a graphical user interface
      but I want to hide the system menu
      I mean the window menu
      Is this possible?
      If is possible please give me how to do that
      Thanks in advance
    • helmar
      By helmar
      I was playing around with simple GUI creation.  I tend to like parameter driven coding (in prior life (years ago) as Clipper/FoxPro/dBase coder).  Just wanted to see what I could do with a GUI.
      #Region options, includes Opt('MustDeclareVars', 1) Opt("GUIOnEventMode", 1) ; Change to OnEvent mode #include <GUIConstantsEx.au3> #EndRegion options, includes Global Const $nCols = 2, $nRows = 6, $nSpacer = 10, $nBtnWidth = 150, $nBtnHeight = 30 Global $xName = 0, $xID = 0 Global $nGUIWidth = ($nCols * $nBtnWidth) + (($nCols + 1) * $nSpacer) Global $nGUIHeight = ($nRows * $nBtnHeight) + (($nRows + 1) * $nSpacer) Global $hMainGUI = GUICreate("Calculated GUI", $nGUIWidth, $nGUIHeight, -1, -1) For $xRows = 1 to $nRows ;in this arrangement, tabbing is left to right, then next row For $xCols = 1 to $nCols ;reverse the order of this line with the prior line for top to bottom tabbing, then next col $xName += 1 $xID += 1 Global $Dummy = GUICtrlCreateButton("Button" & $xName, _ ($nBtnWidth * ($xCols - 1)) + (($xCols - 1) * $nSpacer) + $nSpacer, _ ($nBtnHeight* ($xRows - 1)) + (($xRows - 1) * $nSpacer) + $nSpacer, _ $nBtnWidth, _ $nBtnHeight) GUICtrlSetOnEvent($xID+2, "Handler") Next Next GUISetOnEvent($GUI_EVENT_CLOSE, "CloseApp") GUISetState(@SW_SHOW) While 1 Sleep(10) WEnd Func CloseApp() Exit EndFunc Func Handler() MsgBox(0,0,"Button " & @GUI_CtrlId - 2) EndFunc  
×