Board logo

標題: 現在好多 System 都有得 call API [打印本頁]

作者: hkepcu1    時間: 2017-11-10 12:41     標題: 現在好多 System 都有得 call API

現在好多 System 都有得 call API, 都係用 https 在 browser call 個 API 功能 (要 login)
我想寫 d 好快的 local program,等 Users 在他的 PC 上,一按個 icon 就 call 到相對應 system 相關的 API 功能 ...
有冇好快的方法寫到 d call API 的 program 仔出來比 users 在 PC 用的?
作者: 梁炳    時間: 2017-11-10 13:12

nodejs, electron

甚至一個html都寫到,你個api要support CORS
作者: hkepcu1    時間: 2017-11-10 13:58

nodejs, electron

甚至一個html都寫到,你個api要support CORS
梁炳 發表於 2017-11-10 01:12 PM



    其實,初步我是想控制一個門的系統的開門的 ...
佢可以 call 個 http link 'http://192.168.1.10/rc.cgi?o=1,1' > (prompt up for entering password) > (if password correct, then open the door)

  如果 html 寫個 local program:
1. 可以唔 prompt up 個 browser?
2. 想做個 icon 在個 PC 的 task bar 上,user 一按個 icon 就可以開到門
作者: 梁炳    時間: 2017-11-10 15:08

其實,初步我是想控制一個門的系統的開門的 ...
佢可以 call 個 http link 'http://192.16 ...
hkepcu1 發表於 2017-11-10 13:58


html即係要開browser做野囉
double click個html咪開browser, 咁都要問...

想好睇d就寫electron (javascript), 包裝做一個exe檔
點玩都得
作者: GaoMachine    時間: 2017-11-10 16:49

唔用browser 又要出task bar
用C# WebClient 好快寫到

參考:
https://stackoverflow.com/questi ... ebclient-in-c-sharp

不過樓主完全唔似Programmer ,唔知可以幾快喇
都未計加個「簡單」Login ...
作者: hkepcu1    時間: 2017-11-10 17:32

唔用browser 又要出task bar
用C# WebClient 好快寫到

參考:


不過樓主完全唔似Programmer ,唔知可以幾快 ...
GaoMachine 發表於 2017-11-10 04:49 PM


唔用browser 又要出task bar
sorry, 我意思係好似 script 咁,double click to run the script on Windows PC for running the http API to call the door open & I don't want to prompt anything ...
作者: GaoMachine    時間: 2017-11-10 18:41

回覆 6# hkepcu1


咁仲簡單, 自己 google一下 'curl'
作者: 556556bt    時間: 2017-11-10 19:27

回覆  hkepcu1


咁仲簡單, 自己 google一下 'curl'
GaoMachine 發表於 2017-11-10 18:41



    powershell script 都得.
作者: hoki1986    時間: 2017-11-11 10:40

好多SCRIPT都得
作者: hkepcu1    時間: 2017-11-12 21:43

用 power script 寫完後,可唔可以改到將 script.ps1 加個 開門 的 icon 上去的?
作者: 556556bt    時間: 2017-11-13 01:05

用 power script 寫完後,可唔可以改到將 script.ps1 加個 開門 的 icon 上去的? ...
hkepcu1 發表於 2017-11-12 21:43



    shortcut icon?
作者: hkepcu1    時間: 2017-11-13 10:12

shortcut icon?
556556bt 發表於 2017-11-13 01:05 AM



    都可以,試下先





歡迎光臨 電腦領域 HKEPC Hardware (https://www.hkepc.com/forum/) Powered by Discuz! 7.2