AYUDA EN IE COM

Post a reply


In an effort to prevent automatic submissions, we require that you complete the following challenge.
Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :| :mrgreen: :geek: :ugeek: :arrow: :angel: :clap: :crazy: :eh: :lolno: :problem: :shh: :shifty: :sick: :silent: :think: :thumbup: :thumbdown: :salute: :wave: :wtf: :yawn: :facepalm: :bravo: :dance: :beard: :morebeard: :xmas: :HeHe: :trollface: :cookie: :rainbow: :monkeysee: :monkeysay: :happybday: :headwall: :offtopic: :superhappy: :terms: :beer:
View more smilies

BBCode is ON
[img] is OFF
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: AYUDA EN IE COM

Re: AYUDA EN IE COM

Post by ImFernando » 19 Feb 2016, 16:13

Gracias amigo...!

Re: AYUDA EN IE COM

Post by Flipeador » 18 Feb 2016, 19:40

Code: Select all

;https://stackoverflow.com/questions/1539032/getting-the-value-of-a-select-box-in-internet-explorer
For IE in ComObjCreate("Shell.Application").Windows
   If InStr(IE.FullName, "iexplore.exe")
      break
;IE.Navigate("file:///" A_Desktop "/a.html")
IE.Visible := true
While IE.Busy
   Sleep, 100
s := IE.Document.getElementById("cb_gestion1")
MsgBox % s.options[s.selectedIndex].Text

AYUDA EN IE COM

Post by ImFernando » 18 Feb 2016, 18:37

Hola

Quisiera saber si pueden ayudarme a extraer el texto de un combo seleccionado de una pagina en HTML

Este es el codigo HTML:

Code: Select all

<td>TRATAMIENTO OFFLINE</td>
<td>
<select id="cb_gestion1" name="cb_gestion1">

<option value="">Seleccione...</option>
<option value='4' >CAIDA</option>
<option value='5' >INGRESADO</option>
<option value='6' selected>PENDIENTE</option>
<option value='7' >SEGUIMIENTO</option>
<option value='8' >OBSERVADO ROBOT</option>
Yo ya lo intente con este codigo

Code: Select all

wb.document.getElementById("cb_gestion1").Value
Pero solo obtengo el valor (Números), y lo que quiero es extraer el texto el que esta en negrita

<option value="">Seleccione...</option>
<option value='4' >CAIDA</option>
<option value='5' >INGRESADO</option>
<option value='6' selected>PENDIENTE</option>
<option value='7' >SEGUIMIENTO</option>
<option value='8' >OBSERVADO ROBOT</option>


Espero de su pronta ayuda un Saludo...!

Top