Jump to content

.ini with autoit ... and webpage displayed inside a window


Recommended Posts

ok ... how can i make my script read /ini file... like i write in ini file version file and my script would read it.. if its not the number as in .ini then download new file..

2nd..#

i dunno how to put a window inside window.. like

in this pic there is white (the huge area)

and i wana put like lets say some text taht will be shown off a webpage... like umm... how to explain good... for example i make a website for game... in it there is another pgage called notice and in that page there are notices,and i want them to be displayed on the window in the pic ( on huge white area) thnx for help.luv autoit team, more power! :idea:

post-57690-12730875232194_thumb.jpg

Link to comment
Share on other sites

You could embed a couple of IE browser ActiveX controls and just apply HTML to them for content. See the examples under _IECreateEmbedded() in the help file.

:idea:

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

You could embed a couple of IE browser ActiveX controls and just apply HTML to them for content. See the examples under _IECreateEmbedded() in the help file.

:idea:

ye but then this window is like.. umm i dont want the window to be like a window ... i want it be like plain white area as it is for the thing i want.. :)

EDIT::: i dont have \include\FTPEx.au3

PLZ upload it ... lol i reinstaled autoit still dont have it

or if posible plz upload all include folder

Edited by TomaSzz
Link to comment
Share on other sites

You mean simple Edit controls?

#include <GuiConstantsEx.au3>
#include <EditConstants.au3>

Global $i1 = 0, $i2 = 0, $i3 = 0

$hGUI = GUICreate("Test", 500, 400)
$idButton_1 = GUICtrlCreateButton("One", 20, 20, 100, 30)
$idButton_2 = GUICtrlCreateButton("Two", 20, 60, 100, 30)
$idButton_3 = GUICtrlCreateButton("Three", 20, 100, 100, 30)
$idEdit_1 = GUICtrlCreateEdit("", 20, 150, 100, 230, $ES_MULTILINE)
$idEdit_2 = GUICtrlCreateEdit("", 140, 20, 340, 240, $ES_MULTILINE)
$idEdit_3 = GUICtrlCreateEdit("", 140, 280, 340, 100, $ES_MULTILINE)
GUISetState()

While 1
    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch
WEnd

:idea:

Edited by PsaltyDS
Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

You mean simple Edit controls?

#include <GuiConstantsEx.au3>
#include <EditConstants.au3>

Global $i1 = 0, $i2 = 0, $i3 = 0

$hGUI = GUICreate("Test", 500, 400)
$idButton_1 = GUICtrlCreateButton("One", 20, 20, 100, 30)
$idButton_2 = GUICtrlCreateButton("Two", 20, 60, 100, 30)
$idButton_3 = GUICtrlCreateButton("Three", 20, 100, 100, 30)
$idEdit_1 = GUICtrlCreateEdit("", 20, 150, 100, 230, $ES_MULTILINE)
$idEdit_2 = GUICtrlCreateEdit("", 140, 20, 340, 240, $ES_MULTILINE)
$idEdit_3 = GUICtrlCreateEdit("", 140, 280, 340, 100, $ES_MULTILINE)
GUISetState()

While 1
    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch
WEnd

:idea:

nooo.... i want to insert like... u know in some pages of mmo.s there is notice board,and the notice board updates it self from forum latest post.. thats what i wana add to my window..( in that pic)
Link to comment
Share on other sites

but can any1 upload the full include folder?

plz :(

Upload what folder? AutoIt comes with all the standard UDFs included in the installer.

:)

P.S. Let me clue you in to a new breakthrough in computer hardware: The "Shift Key"

By pressing this "Shift Key" you can achieve correct capitalization in typing. Almost as good as a typewriter!

:idea:

Edited by PsaltyDS
Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Post what you tried.

:idea:

#AutoIt3Wrapper_au3check_parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <SendMessage.au3>
#include <GuiButton.au3>
#include <File.au3>
#include <IE.au3>
#include <INet.au3>
#include <StaticConstants.au3>
#include <ProgressConstants.au3>

_IEErrorHandlerRegister ()

Global Const $SC_DRAGMOVE = 0xF012
Global $iMemo

HotKeySet("{ESC}", "On_Exit") ; Press ESC to exit
Func On_Exit()
    Exit
EndFunc

Local $hButton
Local $btn, $chk, $rdo, $Msg, $exit
Local $file = "Main.exe"
Local $forum, $oIE, $min

$hGUI = GUICreate("QuantumMU launcher", 642, 493, -1, -1, $WS_POPUP, $WS_EX_LAYERED)
$oIE = _IECreateEmbedded ()

GUICreate("Embedded Web control Test", 640, 580, _
        (@DesktopWidth - 640) / 2, (@DesktopHeight - 580) / 2, _
        )

$GUIActiveX = GUICtrlCreateObj($oIE, 10, 40, 600, 360)
$GUI_Button_Back = GUICtrlCreateButton("test1", 10, 420, 100, 30)
$GUI_Button_Forward = GUICtrlCreateButton("test2", 120, 420, 100, 30)
$GUI_Button_Home = GUICtrlCreateButton("test3", 230, 420, 100, 30)
$GUI_Button_Stop = GUICtrlCreateButton("test", 340, 420, 100, 30)

GUICtrlCreatePic("Launcher\MAIN.jpg", 0, 0, 642, 493)
GUICtrlSetState(-1, $GUI_DISABLE) ; Do not forget to disable the background
 
$btn = GUICtrlCreateButton("", 20, 55, 141, 22, $BS_BITMAP)
    _GUICtrlButton_SetImage($btn, "Launcher\start game new.bmp")

$exit = GUICtrlCreateButton("", 590, 25, 22, 15, $BS_BITMAP)
    _GUICtrlButton_SetImage($exit, "Launcher\exit.bmp")
    
$forum = GUICtrlCreateButton("", 20, 81, 141, 22, $BS_BITMAP)
    _GUICtrlButton_SetImage($forum, "Launcher\forum.bmp")
    
$register = GUICtrlCreateButton("", 20, 114, 141, 22, $BS_BITMAP)
    _GUICtrlButton_SetImage($register, "Launcher\register.bmp")
    
$update = GUICtrlCreateButton("", 182, 342, 413, 87, $BS_BITMAP)
    _GUICtrlButton_SetImage($update, "Launcher\Update.bmp")
    
$min = GUICtrlCreateButton("", 553, 25, 22, 15, $BS_BITMAP)
    _GUICtrlButton_SetImage($min, "Launcher\minimize.bmp")

GUISetState(@SW_SHOW)

MemoWrite("Button1 Image Handle: " & _GUICtrlButton_GetImage($btn))

While 1

    Switch GUIGetMsg()
        Case $GUI_EVENT_PRIMARYDOWN ; Mouse button down
            _SendMessage($hGUI, $WM_SYSCOMMAND, $SC_DRAGMOVE, 0) ; Tell GUI to drag with the mouse
    $Msg = GUIGetMsg()
        If $Msg = $GUI_EVENT_CLOSE Then ExitLoop
        Case $btn
            If FileExists($file) Then
                Run("Main.exe")
            Else
                MsgBox(0, "Error", "Main.exe not found!")
                Sleep(1000)
                Exit
            EndIf
        Case $exit
            Exit
        Case $forum
            _IECreate ("http://www.quantummu.kk5.org/#/forum/4540621791")
        Case $register
            _IECreate ("http://www.quantummu.kk5.org/#/registermu-game-account/4540621790")
        Case $update
$Form1              = GUICreate("Update", 400, 170, -1, -1)

$pb_File            = GUICtrlCreateProgress(30, 30, 300, 20, $PBS_SMOOTH)
$lbl_FilePercent    = GUICtrlCreateLabel("0 %", 335, 32, 35, 16, $SS_RIGHT)

$pb_Overall         = GUICtrlCreateProgress(30, 80, 300, 20, $PBS_SMOOTH)
$lbl_OverallPercent = GUICtrlCreateLabel("0 %", 335, 82, 35, 16, $SS_RIGHT)

$but_Download       = GUICtrlCreateButton("Update!", 160, 120, 80, 30)

GUISetState(@SW_Show)

While 1
    
    $nMsg = GUIGetMsg()
    
    If $nMsg = $GUI_EVENT_CLOSE Then EXIT
        
    If $nMsg = $but_Download Then _Download()
    
WEnd


Func _Download()
    
    ; Disable the download button
    GUICtrlSetState($but_Download, $GUI_DISABLE)
    
    ; Reset total filesize to download
    $TotalToDownload = 0
    
    Dim $DownloadArray[8][3]
    
    ; Setup the URL's to download - i'm using CutePDF 7 times to demonstrate
    $DownloadArray[1][0] = "http://download791.mediafire.com/xbimwo9syrgg/3n3zkdmnnmn/QuantumMU.rar"

    For $i = 1 To UBound($DownloadArray)-1
        
        ; Get the File size
        $FileSize = INetGetSize($DownloadArray[$i][0])
        
        ; Current File Size
        $DownloadArray[$i][1] = $FileSize
        
        ; Cumulative Total
        $DownloadArray[$i][2] = $TotalToDownload
        
        ; Add the current file size to the total
        $TotalToDownload += $FileSize
    Next
    
    ; Do the Downloads
    For $i = 1 To UBound($DownloadArray)-1
        
        ; Dow the download in the background
        $Download = INetGet($DownloadArray[$i][0], "" & $i & "Update.exe", 1, 1)
        
        ; Loop to update progress
        Do
            ; Get number of bytes read for current file
            $BytesDownloaded    = INetGetInfo($Download, 0)
            
            ; Add this to the cumulative total
            $DownloadedSoFar    = $DownloadArray[$i][2] + $BytesDownloaded
            
            ; Calculate the current file percentage
            $FileProgress       = Floor(($BytesDownloaded / $DownloadArray[$i][1]) * 100)
            
            ; Calculate the overall percentage
            $OverallProgress    = Floor(($DownloadedSoFar / $TotalToDownload) * 100)
            
            ; Update the Current FIle progress bar
            GUICtrlSetData($pb_File, $FileProgress)
            
            ; Only update the current file percent label if it has changed to avoid flickering
            If GUICtrlRead($lbl_FilePercent) <> $FileProgress & " %" Then GUICtrlSetData($lbl_FilePercent, $FileProgress & " %")
            
            ; Update the overall progress bar
            GUICtrlSetData($pb_Overall, $OverallProgress)

            ; Only update the overall file percent label if it has changed to avoid flickering
            If GUICtrlRead($lbl_OverallPercent) <> $OverallProgress & " %" Then GUICtrlSetData($lbl_OverallPercent, $OverallProgress & " %")
            
            ; Only update the title bar (overall) percent label if it has changed to avoid flickering
            If WinGetTitle($Form1, "") <> $OverallProgress & " % - Update" Then WinSetTitle($Form1, "", $OverallProgress & " % - Update")
        
        ; Continue loop until download is complete
        Until InetGetInfo($Download, 2)
        
        ; Set current file progress bar to 100% when complete
        GUICtrlSetData($pb_File, 100)
        
        ; Set current file percent label to 100% when complete
        GUICtrlSetData($lbl_FilePercent, "100 %")
    
    Next

    ; Set overall progress bar to 100% when complete
    GUICtrlSetData($pb_Overall, 100)
    
    ; Set overall percent label to 100% when complete
    GUICtrlSetData($lbl_OverallPercent, "100 %")
    
    ; Display message box to say all downloads complete
    MsgBox(64, "Update", "Update downloaded!")
    
    ; Reset GUI
    WinSetTitle($Form1, "", "Update")
    
    GUICtrlSetData($pb_File, 0)
    GUICtrlSetData($lbl_FilePercent, "0 %")
    
    GUICtrlSetData($pb_Overall, 0)
    GUICtrlSetData($lbl_OverallPercent, "0 %")
    
    ; Enable the download button
    GUICtrlSetState($but_Download, $GUI_ENABLE)
    Call("instal")    
EndFunc

    Func instal()
    MsgBox(0, "Update", "Please wait while update is being installed!", 6000)
    Run("installer.exe")
    EndFunc

        Case $min
            @SW_HIDE = "QuantumMU launcher" 
 
    EndSwitch

WEnd

    Exit

; Write a line to the memo control
Func MemoWrite($sMessage)
    GUICtrlSetData($iMemo, $sMessage & @CRLF, 1)
EndFunc   ;==>MemoWrite
Link to comment
Share on other sites

Upload what folder? AutoIt comes with all the standard UDFs included in the installer.

:)

P.S. Let me clue you in to a new breakthrough in computer hardware: The "Shift Key"

By pressing this "Shift Key" you can achieve correct capitalization in typing. Almost as good as a typewriter!

:idea:

ive vista and i dont hav full "include" folder... plz upload urs ,thnx

Link to comment
Share on other sites

Go to the AutoIt3 directory that contains your install of AutoIt. (At C:\Program Files\AutoIt3 by default.) There will be a subfolder called 'Include' which includes all the standard UDFs, including FTPEx.au3.

If that folder isn't there, download the full version of AutoIt from the home page of this site and install it.

No one is going to 'upload' anything you could 'download' very easily from the normal location.

:idea:

Edited by PsaltyDS
Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
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...