LoginSignup
0
0

More than 5 years have passed since last update.

smallbasicでpost

Posted at

自前のエクステンションを使います。

サンプル

GraphicsWindow.BackgroundColor = "skyblue"
button = Controls.AddButton("run", 200, 100)
Controls.ButtonClicked = onclick
Sub onclick
  WC = Text.GetCharacter(34)
  CR = Text.GetCharacter(13) + Text.GetCharacter(10)
  code = ""
  code = code + "Function setup(a)" + CR 
  code = code + "url = " + WC + "http://ohisamallc.dip.jp/test21.php" + WC + CR 
  code = code + "key = " + WC + "txt=test desu2" + WC + CR
  code = code + "Set obj = CreateObject(" + WC + "MSXML2.ServerXMLHTTP" + WC + ")" + CR
  code = code + "obj.open " + WC + "POST" + WC + ", url, False" + CR
  code = code + "obj.setRequestHeader " + WC + "Content-Type" + WC + ", " + WC + " application/x-www-form-urlencoded" + WC + CR
  code = code + "obj.setRequestHeader " + WC + "Content-Length" + WC + ", " + WC + "length" + WC+ CR
  code = code + "obj.send key" + CR
  code = code + "setup = obj.responseText" + CR
  code = code + "msgbox setup" + CR
  code = code + "End Function" + CR
  a = Class1.VBSrun(code)
EndSub
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0