aldo Posted December 28, 2015 Posted December 28, 2015 (edited) how i can get API token for login?https://developers.binary.com/ Edited December 28, 2015 by aldo
water Posted December 28, 2015 Posted December 28, 2015 Welcome to AutoIt and the forum!What have you tried so far? My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
Danyfirex Posted December 28, 2015 Posted December 28, 2015 (edited) Hello. consider use a lenguage recommended by the page. Maybe javascript otherwise you can use Winhttp UDF but you must use Windows 8 or upper. Also You can do a trick mixing Javascript and IE.You mush create it in your account.Saludos Edited December 28, 2015 by Danyfirex Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut
TheDcoder Posted December 28, 2015 Posted December 28, 2015 (edited) Here is the direct link which I found in the API Playground... It redirects to the login page, a registration will get you the API key (as already mentioned by @Danyfirex ) P.S A word of advice, This forum provides support for problems with AutoIt... not with external matters! You can post questions NOT related to AutoIt in the Language Specific sub-forum or Chat (Not accessible to new members) sub-forum forum P.P.S I just found out there is a Glitter Chat Room (for Binary [That API's provider] developers). Although you need a GitHub account to chat . Edited December 28, 2015 by TheDcoder Appended P.P.S EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time) DcodingTheWeb Forum - Follow for updates and Join for discussion
aldo Posted December 29, 2015 Author Posted December 29, 2015 i know how get API token, but how to use the token to login?
Danyfirex Posted December 29, 2015 Posted December 29, 2015 Token is not for login is for use the API. Look page examples.Saludos Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut
mendrofa Posted February 10, 2016 Posted February 10, 2016 This sample code javascript from websocket who can help me to convert to au3 var ws = new WebSocket('wss://ws.binaryws.com/websockets/v3'); ws.onopen = function(evt) { ws.send(JSON.stringify({ticks:'R_100'})); }; ws.onmessage = function(msg) { var data = JSON.parse(msg.data); console.log('ticks update: %o', data); };
TheDcoder Posted February 10, 2016 Posted February 10, 2016 1 hour ago, mendrofa said: var ws = new WebSocket('wss://ws.binaryws.com/websockets/v3'); ws.onopen = function(evt) { ws.send(JSON.stringify({ticks:'R_100'})); }; ws.onmessage = function(msg) { var data = JSON.parse(msg.data); console.log('ticks update: %o', data); }; How did you do that!? EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time) DcodingTheWeb Forum - Follow for updates and Join for discussion
Danyfirex Posted February 10, 2016 Posted February 10, 2016 You can do it using Winhttp (I'm really busy I'll will not traslate to Autoit) . (make sure using AutoIt for that. it will not be so stable. https://github.com/uri247/Win81Desktop/tree/master/WinHTTP%20WebSocket%20sample Saludos Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut
junkew Posted February 13, 2016 Posted February 13, 2016 Show some confused code you tried FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets
mendrofa Posted February 21, 2016 Posted February 21, 2016 this my code #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 315, 233, 192, 124) $Group1 = GUICtrlCreateGroup("", 8, 8, 297, 217) $Input1 = GUICtrlCreateInput("9QeuqAtACdcvjIW", 24, 24, 177, 21) $Button1 = GUICtrlCreateButton("conect socket", 207, 24, 91, 25) $Edit1 = GUICtrlCreateEdit("", 24, 56, 273, 153) GUICtrlSetData(-1, "") GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Select case $nmsg = $button1 tes() Case $nmsg = $GUI_EVENT_CLOSE Exit EndSelect WEnd func tes() Local $sIPAddress = "wss://ws.binaryws.com/websockets/v3" ; This IP Address only works for testing on your own computer. Local $iPort = guictrlread($input1) ; Port used for the connection. ; Assign a Local variable the socket and connect to a Listening socket with the IP Address and Port specified. Local $iSocket = TCPConnect($sIPAddress, $iPort) sleep(5000) Local $iListenSocket = TCPListen($sIPAddress, $iPort, 100) guictrlsetdata($edit1, $iListenSocket) EndFunc
water Posted February 21, 2016 Posted February 21, 2016 NB: Could you please use code tags when posting a script? Makes reading your code much easier My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
mendrofa Posted February 21, 2016 Posted February 21, 2016 expandcollapse popup#include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 315, 233, 192, 124) $Group1 = GUICtrlCreateGroup("", 8, 8, 297, 217) $Input1 = GUICtrlCreateInput("9QeuqAtACdcvjIW", 24, 24, 177, 21) $Button1 = GUICtrlCreateButton("conect socket", 207, 24, 91, 25) $Edit1 = GUICtrlCreateEdit("", 24, 56, 273, 153) GUICtrlSetData(-1, "") GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Select case $nmsg = $button1 tes() Case $nmsg = $GUI_EVENT_CLOSE Exit EndSelect WEnd func tes() Local $sIPAddress = "wss://ws.binaryws.com/websockets/v3" ; This IP Address only works for testing on your own computer. Local $iPort = guictrlread($input1) ; Port used for the connection. ; Assign a Local variable the socket and connect to a Listening socket with the IP Address and Port specified. Local $iSocket = TCPConnect($sIPAddress, $iPort) sleep(5000) Local $iListenSocket = TCPListen($sIPAddress, $iPort, 100) guictrlsetdata($edit1, $iListenSocket) EndFunc
water Posted February 21, 2016 Posted February 21, 2016 Thanks But you could as well have modified post #12 My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
water Posted February 21, 2016 Posted February 21, 2016 (edited) You need to add some error checking after TCPConnect and TCPListen. What is the return value and the value of @error? Edited February 21, 2016 by water My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
mendrofa Posted February 21, 2016 Posted February 21, 2016 like that expandcollapse popup#include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <MsgBoxConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 315, 233, 192, 124) $Group1 = GUICtrlCreateGroup("", 8, 8, 297, 217) $Input1 = GUICtrlCreateInput("9QeuqAtACdcvjIW", 24, 24, 177, 21) $Button1 = GUICtrlCreateButton("conect socket", 207, 24, 91, 25) $Edit1 = GUICtrlCreateEdit("", 24, 56, 273, 153) GUICtrlSetData(-1, "") GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Select case $nmsg = $button1 tes() Case $nmsg = $GUI_EVENT_CLOSE Exit endSelect WEnd func tes() Local $sIPAddress = "wss://ws.binaryws.com/websockets/v3" ; This IP Address only works for testing on your own computer. Local $iPort = guictrlread($input1) ; Port used for the connection. ; Assign a Local variable the socket and connect to a Listening socket with the IP Address and Port specified. Local $iSocket = TCPConnect($sIPAddress, $iPort) If @error Then ; The server is probably offline/port is not opened on the server. Local $iError = @error MsgBox(BitOR($MB_SYSTEMMODAL, $MB_ICONHAND), "", "Could not connect, Error code: " & $iError) Return False Else MsgBox($MB_SYSTEMMODAL, "", "Connection successful") EndIf Local $iListenSocket = TCPListen($sIPAddress, $iPort, 100) Local $iError = 0 ; If an error occurred display the error code and return False. If @error Then ; Someone is probably already listening on this IP Address and Port (script already running?). $iError = @error MsgBox(BitOR($MB_SYSTEMMODAL, $MB_ICONHAND), "", "Could not listen, Error code: " & $iError) Return False EndIf ; Assign Local variable to be used by Listening and Client sockets. Local $iSocket = 0 Do ; Wait for someone to connect (Unlimited). ; Accept incomming connexions if present (Socket to close when finished; one socket per client). $iSocket = TCPAccept($iListenSocket) ; If an error occurred display the error code and return False. If @error Then $iError = @error MsgBox(BitOR($MB_SYSTEMMODAL, $MB_ICONHAND), "", "Could not accept the incoming connection, Error code: " & $iError) Return False EndIf Until $iSocket <> -1 ;if different from -1 a client is connected. ; Close the Listening socket to allow afterward binds. TCPCloseSocket($iListenSocket) MsgBox($MB_SYSTEMMODAL, "", "Client Connected.") guictrlsetdata($edit1, $iListenSocket) EndFunc
mendrofa Posted February 21, 2016 Posted February 21, 2016 but still can't to connect to server websocket
AutoBert Posted February 21, 2016 Posted February 21, 2016 from your script: 1 hour ago, mendrofa said: If @error Then ; The server is probably offline/port is not opened on the server.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now