Jump to content
Sign in to follow this  
mmaannddoo

sending a value to website input

Recommended Posts

mmaannddoo

hey guys 

i need someone 2 help me in my program

my program is sending a value i type in GUI and put it at a specific input

this is my code 

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <Constants.au3>
#include <IE.au3>


$hGUI = GUICreate( "New Window", 865, 255, -1, -1)
$hPic = GUICtrlCreatePic( ".\Logo.jpg", 9, 11, 300, 219)
$hInput = GUICtrlCreateInput("enter session key here", 323, 14, 530, 31)
$hButton = GUICtrlCreateButton( "Send Session Key", 499, 92, 192, 54)
GUISetState()

Func run2()
   $oIE = _IECreate("the website")
   Local $oForm = _IEFormGetCollection($oIE, 0)
   $o_session_key = _IEFormElementGetObjByName($oForm, "session_key")
   _IEFormElementSetValue($o_session_key, $hInput)
EndFunc 

While 1
        $msg = GUIGetMsg()
        Select
            Case $msg = $GUI_EVENT_CLOSE
                ExitLoop
            Case $msg = $hButton
                run2()
        EndSelect
    WEnd

this code is put number 4 in the website input 

Share this post


Link to post
Share on other sites
Edano

$hinput is the control id of the input, 4.

if you want the value typed in input, use guictrlread($hinput)

cheers ;) E

 

Edit: the rest of the thread from here on is nonsense, or at least a bad comedy.

---------------------------------------------------------------------------------------------------

Edited by Edano
  • Like 1

[color=rgb(255,0,0);][font="'comic sans ms', cursive;"]FukuLeaks[/color][/font]

Share this post


Link to post
Share on other sites
Queener

as Edano said. But to be on the clear side you need to do this:

send(guictrlread($hinput))

This code must be after your controlclick or however you want it to send it to - on the website input.

so for example

winactivation("test.exe", "")
send("{TAB}")
send(guictrlread($hinput))

 

this is not a real code; but to give you an example. Real code would have to deal with if win exists then do this; else open the program etc...

Edited by asianqueen

Msgbox(0, "Hate", "Just hate it when I post a question and find my own answer after a couple tries. But if I don't post the question, I can't seem to resolve it at all.")

Share this post


Link to post
Share on other sites
Edano

as Edano said. But to be on the clear side you need to do this:

send(guictrlread($hinput))

This code must be after your controlclick or however you want it to send it to - on the website input.

so for example

winactivation("test.exe", "")
send("{TAB}")
send(guictrlread($hinput))

this is not a real code; but to give you an example. Real code would have to deal with if win exists then do this; else open the program etc...

.

what ? NO ! :naughty:

Edited by Edano

[color=rgb(255,0,0);][font="'comic sans ms', cursive;"]FukuLeaks[/color][/font]

Share this post


Link to post
Share on other sites
Queener

I tested before post... Works fine with me.

.

what ? NO ! :naughty:


Msgbox(0, "Hate", "Just hate it when I post a question and find my own answer after a couple tries. But if I don't post the question, I can't seem to resolve it at all.")

Share this post


Link to post
Share on other sites
Edano

I tested before post... Works fine with me.

.

 with autoit ???


[color=rgb(255,0,0);][font="'comic sans ms', cursive;"]FukuLeaks[/color][/font]

Share this post


Link to post
Share on other sites
Queener

yes...

here's partial of my working code I have been using

If WinActive($Title) Then
        ControlClick($Title,"","MozillaWindowClass1","Left",1,85,60)
        Send($Username,1)
  Send("{TAB}")
        ControlClick($Title,"","MozillaWindowClass1","Left",1,85,83)
        Send($Password,1)
  Send("{ENTER}")

 

where $username and password is the gui code.


Msgbox(0, "Hate", "Just hate it when I post a question and find my own answer after a couple tries. But if I don't post the question, I can't seem to resolve it at all.")

Share this post


Link to post
Share on other sites
Edano

asianqueen, i hate to say that, but do you even uderstand the code posted in OP ?

i would estimate it is far above your present capabilities, and what you suggest is far off.


[color=rgb(255,0,0);][font="'comic sans ms', cursive;"]FukuLeaks[/color][/font]

Share this post


Link to post
Share on other sites
Queener

correct me if i'm wrong. He/she created an input and whatever value is within the input of autoit to paste that value to web browser specific textbox/input. If this isn't what the OP is requesting then I'm way off... Otherwise, I'm just giving an idea to the OP to get started.

Edited by asianqueen

Msgbox(0, "Hate", "Just hate it when I post a question and find my own answer after a couple tries. But if I don't post the question, I can't seem to resolve it at all.")

Share this post


Link to post
Share on other sites
Edano

no, your way off. please read the helpfile about _IE* functions.


[color=rgb(255,0,0);][font="'comic sans ms', cursive;"]FukuLeaks[/color][/font]

Share this post


Link to post
Share on other sites
Kidney

correct me if i'm wrong. He/she created an input and whatever value is within the input of autoit to paste that value to web browser specific textbox/input. If this isn't what the OP is requesting then I'm way off... Otherwise, I'm just giving an idea to the OP to get started.

the OP says he wants to take information from the GUI and place it into an element of a website. you r going in the opposite direction.

Share this post


Link to post
Share on other sites
Blue_Drache

What website are you trying ot automate, mmaannddoo? 

$oIE = _IECreate("the website")
isn't helpful at all.  Perhaps we can assist if you tell us which website?

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Share this post


Link to post
Share on other sites
Melba23

mmaannddoo,

And here you are asking again about "session keys". Are you going to explain why you want to extract and send such a thing in this thread - or are you going to ignore my question a second time? :huh:

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
Blue_Drache

mmaannddoo,

And here you are asking again about "session keys". Are you going to explain why you want to extract and send such a thing in this thread - or are you going to ignore my question a second time? :huh:

M23

Somehow, I don't think he's going to respond, much less return.  *Shrug*


Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Share this post


Link to post
Share on other sites
Melba23

Blue_Drache,

I agree - so....... :naughty:

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×