Jump to content
Tripoz

how to Read value and paste it in 6 different Inputbox

Recommended Posts

Tripoz

Hi,

i had a project, but i stuck in final.

my code :

---edited---

that i ask r:
- how to record 6 values that come from $Label10 (Spot) to 6 different Inputbox ($Inputbox5,6,7,8,9,10) and put it on Function Hitungbarrier()

- how to make my $button3 able to Exit the loop ?coz in that script my exit button didnt work properly

Thx in advance,


EndFunc

Edited by Tripoz
typo

Share this post


Link to post
Share on other sites
jvds

to fix your button problems you could try Opt("GUIOnEventMode", 1), link the buttons to functions and go from there like example above

;top
#include <GUIConstantsEx.au3> ;$GUI_EVENT_CLOSE
Opt("GUIOnEventMode", 1) ;this will let you link functions tu buttons



;GUICreate here


;this goes under your created gui
GUISetOnEvent($GUI_EVENT_CLOSE, "_GUI_EVENT_CLOSE") ;the gui exit red X button
GUICtrlSetOnEvent($Button3, "_Button3")
GUICtrlSetOnEvent($Button1, "_Button1")



;your button functions at 
Func _Button1()
    ;kemana()
    ;arahlambung()
    ;cektick()
    ;target()
    ;OP()
EndFunc
Func _Button3()
    Exit
EndFunc
Func _GUI_EVENT_CLOSE()
    GUISetState(@SW_HIDE,$Form1_1);if you need to run or save someting before exit, hide gui and do it and then exit
    Exit
EndFunc   ;==>_GUI_EVENT_CLOSE

I get an ie error when i run your script, give an example of Data in $Label10 that you want to split, and how or where do you call your Hitungbarrier() function?

Edited by jvds
modified text

Share this post


Link to post
Share on other sites
Tripoz

--edited--

Edited by Tripoz

Share this post


Link to post
Share on other sites
jvds

ok, lets see if i understand you correctly, you are having trouble caching the spot price from the site? the one in html line "<span id="spot" class="price_moved_down">699.1029</span>"?
and if that is correct then i suppose you try to get that number to $Label10 and display it on GUI? correct?
i get --> IE.au3 T3.0-1 Warning from function _IEGetObjById, $_IESTATUS_NoMatch (spot), dont have much exp on ie, but by the look of it, <span id="spot" is maybe not an object, and a frame instead, will look latter when back home in like 8 hours, so if i understand correcly and this is your problem, then you can try other ie fucntions like _IEFrameGetCollection() and try to sort it from there, hopefully some one else give a tip on that one

Share this post


Link to post
Share on other sites
Tripoz

ok, lets see if i understand you correctly, you are having trouble caching the spot price from the site? the one in html line "<span id="spot" class="price_moved_down">699.1029</span>"?
and if that is correct then i suppose you try to get that number to $Label10 and display it on GUI? correct?
i get --> IE.au3 T3.0-1 Warning from function _IEGetObjById, $_IESTATUS_NoMatch (spot), dont have much exp on ie, but by the look of it, <span id="spot" is maybe not an object, and a frame instead, will look latter when back home in like 8 hours, so if i understand correcly and this is your problem, then you can try other ie fucntions like _IEFrameGetCollection() and try to sort it from there, hopefully some one else give a tip on that one

yes buddy.

thats exactly what i mean.

for that error, i got too..but the code still able to running.

Im nubie here, n just copy some example from internet to make mine...

btw thx for ur kindness to helping me.its so much mean for me.. :)

Share this post


Link to post
Share on other sites
jvds

try this line instead of yours. and see if your browser even loads up the website, i dont use internet explorer for my browser and _IE uses the internet explorer browser, my iexplorer is 8 xD, im updating to 9 and will test again, i cant use 10 or 11 becouse of interface problems with old systems interfaces i work with

$oIE = _IECreate('https://www.binary.com/c/trade.cgi?market=random&time=5t&form_name=risefall&expiry_type=duration&amount_type=stake&H=S0P&currency=USD&underlying_symbol=R_50&amount=1&date_start=now&type=CALL&l=EN',0,1)

any one have tips on reading text/event-stream urls??
here is the spot price streamed at: https://www.binary.com/push/price/T_CALL_R-50_5t_S0P_c_USD_EN?lastEventId=&r=9731565412328593

Share this post


Link to post
Share on other sites
jvds

seems the problem was my browser, your script actualy retrieve the spot price, but your function target() gets stuck in a loop, disable the following lines and your scrip will load spot in to Gui every 1 sec (lines 70 to 73 from your posted script)

;~ _IEAction($oIE, "refresh")
;~ _IELoadWait($oIE)
;~ target()

 you can use consolewrite to detect problems, for example put Consolewrite ("$Span.InnerHTML="&$Span.InnerHTML&@LF) in your ConnectWebPage() function just begore you call Return $Span, and see if the script do what you actualy need it to do,  also use opt("trayicondebug",1), then hover mouse cursor over autoit exe icon next to computer hour, when your script is running you can see where autoit it is currenly reading your script lines, if the script gets stuck then you know where to look for problems

Edited by jvds
edit

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

×