fbar Posted March 31, 2015 Posted March 31, 2015 (edited) here is the html code of the web page <input onkeypress="EnterKeyLeaves(this.id,event);" onblur="LeaveTextBox(this.id, 'tblARecords_0_hlPointsto', 'tblARecords_0', 'arecord', 'data', 'tblARecords_0_pointstotd', 'Points to');" onfocus="CheckForSameRow('tblARecords_0');" onclick="ARecordNoEdit=true;" onchange="ARecordChange('tblARecords0hdnRecModified', 'tblARecords_0', 0, '0');" style="width: 400px; display: none;" id="tblARecords_0_txtPointsto" value="2.125.69.0" name="tblARecords_0_txtPointsto" type="text"> im trying to change the value="2.125.69.0" id = "tblARecords_0_txtPointsto" how would i change the value ive tryed to submit it has a form but with no joy please any help would be helpful its a table input thanks rob <code sample tag> If $oForm.action <> "0" And Not StringInStr($oForm.action, '.php') Then ;submit _IEFormSubmit($oForm, 0) _IELoadWait($oIE) $gotourl1 = GUICtrlRead ( $URL1 ) _IENavigate($oIE,$gotourl1) Local $dnsinputform = _IEFormGetObjByName($oIE, "form1") Local $dnsinputbox = _IEFormElementGetObjByName($dnsinputform, "tblARecords_0_hlPointsto") _IEFormElementSetValue($dnsinputbox, $ip ,1) MsgBox(1,"new ip just ip call",$ip,2) $newvalue =_IEFormElementgetValue($dnsinputbox) MsgBox(1,"new value set",$dnsinputbox,2) _IEQuit($oIE) guictrlsetdata ($oldip,$ip) </code tag> now i set this up as if its a form but it not a form it a table and i need a little help please <code from firefox under focus code tag> <td id="tblARecords_0_pointstotd" class="datacell OneLinkNoTx" align="left"> <input id="tblARecords0hdnPreviousPointsto" value="2.125.69.0" </code from fire fox> i just need tho change the value thanks rob Edited March 31, 2015 by fbar
fbar Posted March 31, 2015 Author Posted March 31, 2015 IS IT POSSIBAL TO SIMPLY USE ControlSend ( "title", "text", controlID, "string" [, flag = 0] ) ON A IE PAGE TO CHANGE THE IP THANKS
MikahS Posted March 31, 2015 Posted March 31, 2015 (edited) Hey fbar, Just so we can easily look over your code, might you use autoit code tags to put your code into? easily done like so [ autoit ] ;code goes here [ /autoit ] (remove the spaces). Or you can use the blue A (code) in the toolbar. Local Enum $test = 1000 ; just an example Edited March 31, 2015 by MikahS fbar 1 Snips & Scripts My Snips: graphCPUTemp ~ getENVvarsMy Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4 Feel free to use any of my code for your own use. Forum FAQ
fbar Posted March 31, 2015 Author Posted March 31, 2015 (edited) IS THERE AND WAY I CAN CONTROL CLICK AND CONTROL SEND TO THIS I JUST NEED TO CHANGE THE VALUE <a style="" id="tblARecords_0_hlPointsto" class="textLink" onfocus="ARecordEditFocusRow('tblARecords_0', true, 'ddlTTLId');" onclick="ARecordEditRow('tblARecords_0', true, 'ddlTTLId');" href="#" title="2.125.69.0">2.125.69.0</a> MOUSEMOVE WORKS BUT ITS PESTY I DONT MIND MIXING _IE $oIE UP WITH global $OIE what ever will work silent in the background will do for me Ive tryedcontrolsend($IOE,"","tblARecords_0_hlPointsto","left",1) but dosent do anything Edited March 31, 2015 by fbar
MikahS Posted March 31, 2015 Posted March 31, 2015 (edited) I would have a look at using _IE*** functions. Have a look at _IEGetObjById() _IEPropertySet() Edited March 31, 2015 by MikahS Snips & Scripts My Snips: graphCPUTemp ~ getENVvarsMy Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4 Feel free to use any of my code for your own use. Forum FAQ
fbar Posted March 31, 2015 Author Posted March 31, 2015 (edited) so what you saying is this minght work $sID = "tblARecords_0_hlPointst" $thedata = _IEGetObjById($oIE, $sID ) to get data and to set datas $ip = _getip $sID = "tblARecords_0_hlPointst" $setthedata = _IEPropertySet($oIE,$sID,$ip) i havent tested it i just wrote a reply looks to easy do it look right to you my new friend Edited March 31, 2015 by fbar
fbar Posted March 31, 2015 Author Posted March 31, 2015 (edited) FAILED CODE Next If $oForm.action <> "0" And Not StringInStr($oForm.action, '.php') Then ;submit _IEFormSubmit($oForm, 0) _IELoadWait($oIE) $gotourl1 = GUICtrlRead ( $URL1 ) _IENavigate($oIE,$gotourl1) Local $dnsinputform = _IEFormGetObjByName($oIE, "tblARecords_0") Local $dnsinputbox = _IEFormElementGetObjByName($dnsinputform, "tblARecords_0_hlPointsto") _IEFormElementSetValue($dnsinputbox, $ip ,1) MsgBox(1,"new ip just ip call",$ip,2) $newvalue =_IEFormElementgetValue($dnsinputbox) MsgBox(1,"new value set",$dnsinputbox,2) _IEQuit($oIE) guictrlsetdata ($oldip,$ip) I THOUGHT I ADD THIS im just in the process of testing the new code Edited March 31, 2015 by fbar
fbar Posted March 31, 2015 Author Posted March 31, 2015 (edited) i have just had this failed attempt debug message boxes return 0 and nothing happends Next If $oForm.action <> "0" And Not StringInStr($oForm.action, '.php') Then ;submit _IEFormSubmit($oForm, 0) _IELoadWait($oIE) $gotourl1 = GUICtrlRead ( $URL1 ) _IENavigate($oIE,$gotourl1) ;; collect data $sID = "tblARecords_0_hlPointst" $thedata = _IEGetObjById($oIE, $sID ) MSGBOX(1,"THE DATA",$thedata,2) ;set data $ip = _getip $sID = "tblARecords_0_hlPointst" $setthedata = _IEPropertySet($oIE,$sID,$ip) MSGBOX(1,"SET THE DATA",$setthedata,2) MSGBOX(1,"THE IP",$ip,2) Edited March 31, 2015 by fbar
fbar Posted March 31, 2015 Author Posted March 31, 2015 (edited) could the code be [autoit] $sID = "tblARecords_0_hlPointst" $thedata = _IEGetObjById($oIE, $sID ) $setthedata = _IEPropertySet($oIE,$thedata,$ip) [ /autoit ] ill test now my code tagg not working Edited March 31, 2015 by fbar
fbar Posted March 31, 2015 Author Posted March 31, 2015 more failed code [autoit] Next If $oForm.action <> "0" And Not StringInStr($oForm.action, '.php') Then ;submit _IEFormSubmit($oForm, 0) $gotourl1 = GUICtrlRead ( $URL1 ) _IENavigate($oIE,$gotourl1) _IELoadWait($oIE) $sID = "tblARecords_0_hlPointst" $thedata = _IEGetObjById($oIE, $sID ) $setthedata = _IEPropertySet($oIE,$thedata,$ip) ;; collect data ;$sID = "tblARecords_0_hlPointst" ;$thedata = _IEGetObjById($oIE, $sID ) ;MSGBOX(1,"THE DATA",$thedata,2) ;set data $ip = _getip() ;$sID = "tblARecords_0_hlPointst" ;$setthedata = _IEPropertySet($oIE,$sID,$ip) MSGBOX(1,"SET THE DATA",$setthedata,2) MSGBOX(1,"THE IP",$ip,2) _IEQuit($oIE) ExitLoop [autoit] please can some one help me
fbar Posted March 31, 2015 Author Posted March 31, 2015 could some one give me sample code where data taken from a web page and updated and submitted , but it not a form tho , its a input on a table
Moderators Melba23 Posted March 31, 2015 Moderators Posted March 31, 2015 fbarStop bumping your own threads every few minutes - or you may find you cannot bump them at all. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
fbar Posted March 31, 2015 Author Posted March 31, 2015 (edited) remove that post please i dont need that kind of advice i havent bumped it once i need a little help somthing this forum dosent like to give Edited March 31, 2015 by fbar
Moderators Melba23 Posted March 31, 2015 Moderators Posted March 31, 2015 fbar,You do not reply to Moderators like that - we are here to keep the forum running smoothly and you are becoming an irritant. Let me explain a few things: - 1. We do not appreciate you opening umpteen threads which are all closely related.- 2. We appreciate even less the fact that you bump your threads every few minutes. You have been told about the "Edit" button - and you then had the temerity to report those post to the Mods asking for them to be removed.- 3. You have been asked to put your code in code tags - yet you still fail to do so.- 4. And then you respond as you have above to a Mod.Well, enough is enough. You will be unable to post for 24 hrs. When you return you had best start behaving in a reasonable manner or you will be removed from the community. M23P.S. And I forgot to mention the PMs you kept sending me earlier today - stop that too. P.P.S. And I see you have just reported me to myself for the post I made above! Think yourself lucky I am not going to change what I have already decided to do to you! :ohmy: Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
Recommended Posts