Sign in to follow this  
Followers 0
TomaSzz

gui with inserts on it in tabs

25 posts in this topic

ok ive run to this place where i figured that insert text and then send it when pressed start would be better.but the insserted text would besent out along with other stuff attached t go with like some .exe files with it after the insert..but i never figured how to make this ..i used help on autooit but it had only the window poping up thing..

Share this post


Link to post
Share on other sites



ok ive run to this place where i figured that insert text and then send it when pressed start would be better.but the insserted text would besent out along with other stuff attached t go with like some .exe files with it after the insert..but i never figured  how to make this ..i used help on autooit but it had only the window poping up thing..

TomaSzz, please try to be more fluent in the explanation. Don't get me wrong: I'm not good at english either but what I've read in your post was kind of an essay about the influence of rails parallelism on chickens waddle. Both give headaches...

Share this post


Link to post
Share on other sites

i just wana make insert boxes where i insert text and it gets sent after i press button.. now ok ? XD

Share this post


Link to post
Share on other sites

Hi, TomaSzz! Where do you want to send the text?

[edit] Something like sending an email with attachment?

hey man thnx for replying but im ok..i figured it out.. :idea:

now problem is ... i have these buttons on my gui(they are or openinig internet explorer link)and whenu press one of em gui just like frozen.. cant exit or move it... have to use task mngr.. here is the code

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

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, $w, $w1

$hGUI = GUICreate("launcher", 642, 493, -1, -1, $WS_POPUP, $WS_EX_LAYERED)
Opt("TrayIconHide", 1)

GUICtrlCreatePic("Launcher\GUI\gfx\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\GUI\gfx\home.bmp")

$exit = GUICtrlCreateButton("", 590, 25, 22, 15, $BS_BITMAP)
    _GUICtrlButton_SetImage($exit, "Launcher\GUI\gfx\exit.bmp")
    
$forum = GUICtrlCreateButton("", 20, 81, 141, 22, $BS_BITMAP)
    _GUICtrlButton_SetImage($forum, "Launcher\GUI\gfx\forum.bmp")
    
$register = GUICtrlCreateButton("", 20, 114, 141, 22, $BS_BITMAP)
    _GUICtrlButton_SetImage($register, "Launcher\GUI\gfx\register.bmp")
    
$update = GUICtrlCreateButton("", 185, 347, 398, 80, $BS_BITMAP)
    _GUICtrlButton_SetImage($update, "Launcher\GUI\gfx\start.bmp")
    
$min = GUICtrlCreateButton("", 22, 145, 133, 158, $BS_BITMAP)
    _GUICtrlButton_SetImage($min, "Launcher\GUI\gfx\donate.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
            _IECreate ("http://www.yourmainpage.com")
            Sleep(100)
            Exit $hGUI
        Case $exit
            Exit
        Case $forum
            _IECreate ("http://www.yourmainpage.com/forum")
            Sleep(100)
            Exit $hGUI
        Case $register
            _IECreate ("http://www.yourmainpage.com/register")
            Sleep(100)
            Exit $hGUI
        Case $update
            If FileExists($file) Then
                Run("cabalmain.exe.exe")
                Sleep(1000)
                Exit $hGUI
            Else
                MsgBox(0, "Error", "cabalmain.exe not found!")
                Sleep(1000)
                Exit $hGUI
            EndIf
        Case $min
            _IECreate("http://www.yourmainpage.com/youradd")
            Exit $hGUI 
    EndSwitch

WEnd

    Exit

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

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

replace $hGUI = ....

with $hGUI = GUICreate("launcher", 642, 493, -1, -1, BitOR($WS_EX_WINDOWEDGE,$WS_EX_LAYERED))

[edit] I have made a few touches:

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


HotKeySet("{ESC}", "On_Exit") ; Press ESC to exit
Func On_Exit()
    Exit
EndFunc
Global Const $SC_DRAGMOVE = 0xF012
Global $iMemo
Global $hGUI, $hButton, $update
Global $btn, $chk, $rdo, $Msg, $exit, $register
Global $file = "Main.exe"
Global $forum, $oIE, $min, $w, $w1

$hGUI = GUICreate("launcher", 642, 493, -1, -1, BitOR($WS_EX_WINDOWEDGE,$WS_EX_LAYERED))
Opt("TrayIconHide", 1)

GUICtrlCreatePic("Launcher\GUI\gfx\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\GUI\gfx\home.bmp")

$exit = GUICtrlCreateButton("", 590, 25, 22, 15, $BS_BITMAP)
    _GUICtrlButton_SetImage($exit, "Launcher\GUI\gfx\exit.bmp")

$forum = GUICtrlCreateButton("", 20, 81, 141, 22, $BS_BITMAP)
    _GUICtrlButton_SetImage($forum, "Launcher\GUI\gfx\forum.bmp")

$register = GUICtrlCreateButton("", 20, 114, 141, 22, $BS_BITMAP)
    _GUICtrlButton_SetImage($register, "Launcher\GUI\gfx\register.bmp")

$update = GUICtrlCreateButton("", 185, 347, 398, 80, $BS_BITMAP)
    _GUICtrlButton_SetImage($update, "Launcher\GUI\gfx\start.bmp")

$min = GUICtrlCreateButton("", 22, 145, 133, 158, $BS_BITMAP)
    _GUICtrlButton_SetImage($min, "Launcher\GUI\gfx\donate.bmp")

GUISetState()

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

While 1
    $Msg = GUIGetMsg()
    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE
            Exit
        Case $GUI_EVENT_PRIMARYDOWN ; Mouse button down
            _SendMessage($hGUI, $WM_SYSCOMMAND, $SC_DRAGMOVE, 0) ; Tell GUI to drag with the mouse
        Case $btn
            _IECreate ("http://www.yourmainpage.com")
            Sleep(100)
            Exit $hGUI
        Case $exit
            Exit
        Case $forum
            _IECreate ("http://www.yourmainpage.com/forum")
            Sleep(100)
            Exit $hGUI
        Case $register
            _IECreate ("http://www.yourmainpage.com/register")
            Sleep(100)
            Exit $hGUI
        Case $update
            If FileExists($file) Then
                Run("cabalmain.exe")
                Sleep(1000)
                Exit $hGUI
            Else
                MsgBox(0, "Error", "cabalmain.exe not found!")
                Sleep(1000)
                Exit $hGUI
            EndIf
        Case $min
            _IECreate("http://www.yourmainpage.com/youradd")
            Exit $hGUI
    EndSwitch

WEnd

    Exit

; Write a line to the memo control
Func MemoWrite($sMessage)
    GUICtrlSetData($iMemo, $sMessage & @CRLF, 1)
EndFunc   ;==>MemoWrite
Edited by taietel

Share this post


Link to post
Share on other sites

ok ty

Share this post


Link to post
Share on other sites

ok another problem... i want to make like on first gui there is only input and ok button... if input is correct (for example it has to be admin) then when i press ok there is a program opened and on that gui new stuff will eb displayed after the program runned... i hope u get me

Share this post


Link to post
Share on other sites

I'm not quite following you, but something like:

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

$Form1 = GUICreate("Checking...", 281, 90)
$lblInput = GUICtrlCreateLabel("Identify yourself:", 8, 10, 80, 17)
$sInput = GUICtrlCreateInput("", 96, 8, 177, 21)
$btnEnter = GUICtrlCreateButton("Enter", 56, 40, 177, 41, $WS_GROUP)
GUISetState(@SW_SHOW)


While 1
 $nMsg = GUIGetMsg()
 Switch $nMsg
  Case $GUI_EVENT_CLOSE
   Exit
  Case $btnEnter
        If GUICtrlRead($sInput) = "admin" Then
          ShellExecute("http://www.google.com")
        EndIf
 EndSwitch
WEnd

You can replace ShellExecute... with what you want.

Share this post


Link to post
Share on other sites

ye but i mean like.. make one gui only .. first page of gui would be that input intentify ...

and if entered intentify correctly then second page of same gui will appear with the other stuff...

Share this post


Link to post
Share on other sites

@TomaSzz

Could you please remove that large image from your signature?

Not only is it large, the animation gets annoying. We also still have several members using dial-up connections and I hate to think of what it's doing to them.


George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites

@TomaSzz

Could you please remove that large image from your signature?

Not only is it large, the animation gets annoying. We also still have several members using dial-up connections and I hate to think of what it's doing to them.

-.-''

Share this post


Link to post
Share on other sites

Thank you


George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites

btw i got problem with input... maybe u can solve it? coz in the input when i enter something and press login button.. ingame it dont send the input i entered in the box it sends '5' XDDD

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

Global Const $SC_DRAGMOVE = 0xF012
Global $iMemo

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

Local $login
Local $btn, $chk, $rdo, $Msg, $exit
Local $file = "cabalmain.exe"
Local $forum, $oIE, $min, $w, $w1

$hGUI = GUICreate("launcher", 642, 493, -1, -1, $WS_POPUP, $WS_EX_LAYERED)
Opt("TrayIconHide", 1)

GUICtrlCreatePic("Launcher\GUI\gfx\MAIN.jpg", 0, 0, 642, 493)
GUICtrlSetState(-1, $GUI_DISABLE) ; Do not forget to disable the background
 
    $btn = GUICtrlCreateButton("", 20, 55, 120, 30, $BS_BITMAP)
    _GUICtrlButton_SetImage($btn, "Login.bmp")

    $login = GUICtrlCreateInput("", 237, 5, 200, 20)

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
                WinActivate("CABAL")
                Sleep(400)
                Send($login)
                Sleep(400)
                Send("{ENTER}")
    EndSwitch
            
WEnd

    Exit

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

Share this post


Link to post
Share on other sites

#15 ·  Posted (edited)

This is with tabs:

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <TabConstants.au3>
#include <WindowsConstants.au3>
#include <GuiTab.au3>


$Form1 = GUICreate("Form2", 358, 252)
$hTab = GUICtrlCreateTab(8, 8, 345, 193)
GUICtrlSetResizing(-1, $GUI_DOCKWIDTH+$GUI_DOCKHEIGHT)
$TabSheet1 = GUICtrlCreateTabItem("TabSheet1")
$Label1 = GUICtrlCreateLabel("Bla,bla:", 40, 56, 36, 17)
$sInput = GUICtrlCreateInput("", 96, 54, 233, 21)
$TabSheet2 = GUICtrlCreateTabItem("TabSheet2");here you can put more controls
$Label2 = GUICtrlCreateLabel("That's what you want to find?", 112, 96, 143, 17)
GUICtrlCreateTabItem("")
$btnEnter = GUICtrlCreateButton("Button1", 272, 216, 75, 25, $WS_GROUP)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###


While 1
 $nMsg = GUIGetMsg()
 Switch $nMsg
  Case $GUI_EVENT_CLOSE
   Exit
  Case $btnEnter
    If GUICtrlRead($sInput) = "admin" Then
         _GUICtrlTab_ClickTab($hTab, 1, "left", True)
    Else
         MsgBox(64, "Error", "Wrong answer!",2)
         Exit
    EndIf
 EndSwitch
WEnd

Usualy, if you try something and it's not working, post it and you will get help. It's hard to guess what you want!   :idea: Or, at least, post the relevant  part of the code, the one with the problems. 

[edit] Speaking about internet connection... :)

TomaSzz, you didn't look at what I've wrote you before! Where is the data from the input?  :( Take a look above and see how you can pass that value!

Edited by taietel

Share this post


Link to post
Share on other sites

Send(GUICtrlRead($Login))


George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites

Send(GUICtrlRead($Login))

ty

Share this post


Link to post
Share on other sites

#18 ·  Posted (edited)

This is with tabs:

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <TabConstants.au3>
#include <WindowsConstants.au3>
#include <GuiTab.au3>


$Form1 = GUICreate("Form2", 358, 252)
$hTab = GUICtrlCreateTab(8, 8, 345, 193)
GUICtrlSetResizing(-1, $GUI_DOCKWIDTH+$GUI_DOCKHEIGHT)
$TabSheet1 = GUICtrlCreateTabItem("TabSheet1")
$Label1 = GUICtrlCreateLabel("Bla,bla:", 40, 56, 36, 17)
$sInput = GUICtrlCreateInput("", 96, 54, 233, 21)
$TabSheet2 = GUICtrlCreateTabItem("TabSheet2");here you can put more controls
$Label2 = GUICtrlCreateLabel("That's what you want to find?", 112, 96, 143, 17)
GUICtrlCreateTabItem("")
$btnEnter = GUICtrlCreateButton("Button1", 272, 216, 75, 25, $WS_GROUP)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###


While 1
 $nMsg = GUIGetMsg()
 Switch $nMsg
  Case $GUI_EVENT_CLOSE
   Exit
  Case $btnEnter
    If GUICtrlRead($sInput) = "admin" Then
         _GUICtrlTab_ClickTab($hTab, 1, "left", True)
    Else
         MsgBox(64, "Error", "Wrong answer!",2)
         Exit
    EndIf
 EndSwitch
WEnd

Usualy, if you try something and it's not working, post it and you will get help. It's hard to guess what you want!  :idea: Or, at least, post the relevant  part of the code, the one with the problems. 

ty

EDIT: hmm is it posible to lock that second tab... or hide it .. until the input isnt entered.. :)

u know ..like privacy stuff..

Edited by TomaSzz

Share this post


Link to post
Share on other sites

nvm all slved! :idea:

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  
Followers 0