{"id":2368,"date":"2022-05-09T10:42:41","date_gmt":"2022-05-09T01:42:41","guid":{"rendered":"http:\/\/oreoreki.gotdns.ch\/?p=2368"},"modified":"2022-05-10T13:15:29","modified_gmt":"2022-05-10T04:15:29","slug":"post-2368","status":"publish","type":"post","link":"http:\/\/oreoreki.gotdns.ch\/?p=2368","title":{"rendered":"\u81ea\u52d5\u7684\u306b\u9589\u3058\u308b\u5236\u9650\u6642\u9593\u4ed8\u304dMsgBox"},"content":{"rendered":"<p><span class=\"embed-youtube\" style=\"text-align:center; display: block;\"><iframe loading=\"lazy\" class=\"youtube-player\" width=\"750\" height=\"422\" src=\"https:\/\/www.youtube.com\/embed\/LFXHBtYj0kk?version=3&#038;rel=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;fs=1&#038;hl=ja&#038;autohide=2&#038;wmode=transparent\" allowfullscreen=\"true\" style=\"border:0;\" sandbox=\"allow-scripts allow-same-origin allow-popups allow-presentation allow-popups-to-escape-sandbox\"><\/iframe><\/span><\/p>\n<div class=\"hcb_wrap\">\n\u81ea\u52d5\u7684\u306b\u9589\u3058\u308b\u5236\u9650\u6642\u9593\u4ed8\u304dMsgBox<\/p>\n<pre class=\"prism line-numbers lang-ts\" data-lang=\"TypeScript\"><code>#If Win64 Then\r\n    ' Excel \u304c64\u30d3\u30c3\u30c8\u7248\u306e\u5834\u5408\u306e\u95a2\u6570\u5b9a\u7fa9\u3067\u3059\u3002\r\n    Private Declare PtrSafe Function MessageBoxTimeoutA Lib \"User32.dll\" _\r\n        (ByVal hWnd As LongPtr, _\r\n        ByVal lpText As String, _\r\n        ByVal lpCaption As String, _\r\n        ByVal uType As VbMsgBoxStyle, _\r\n        ByVal wLanguageID As Long, _\r\n        ByVal dwMilliseconds As Long) As Long\r\n#Else\r\n    ' Excel \u304c32\u30d3\u30c3\u30c8\u7248\u306e\u5834\u5408\u306e\u95a2\u6570\u5b9a\u7fa9\u3067\u3059\u3002\r\n    Private Declare Function MessageBoxTimeoutA Lib \"User32.dll\" _\r\n        (ByVal hWnd As Long, _\r\n        ByVal lpText As String, _\r\n        ByVal lpCaption As String, _\r\n        ByVal uType As VbMsgBoxStyle, _\r\n        ByVal wLanguageID As Long, _\r\n        ByVal dwMilliseconds As Long) As Long\r\n#End If\r\n\r\nSub Macro()\r\n\r\n    'MsgBox \"\u304a\u306f\u3088\u3046\"\r\n    MessageBoxTimeoutA 0&amp;, \"\u304a\u306f\u3088\u3046\", \"2\u79d2\u3067\u9589\u3058\u308b\u30e1\u30c3\u30bb\u30fc\u30b8\", 0, 0&amp;, 2 * 1000\r\n    \r\n    'MsgBox \"\u3053\u3093\u3093\u3061\u306f\", 1\r\n    MessageBoxTimeoutA 0&amp;, \"\u3053\u3093\u3093\u3061\u306f\", \"2\u79d2\u3067\u9589\u3058\u308b\u30e1\u30c3\u30bb\u30fc\u30b8\", 1, 0&amp;, 2 * 1000\r\n    \r\n    'rtn = MsgBox(\"\u3053\u3093\u3070\u3093\u308f\", 67, \"\u30bf\u30a4\u30c8\u30eb\u3082\u5909\u3048\u3089\u308c\u307e\u3059\u3088\")\r\n    rtn = MessageBoxTimeoutA(0&amp;, \"\u3053\u3093\u3070\u3093\u308f\", \"2\u79d2\u3067\u9589\u3058\u308b\u30e1\u30c3\u30bb\u30fc\u30b8\", 3, 0&amp;, 2 * 1000)\r\n    \r\n    MessageBoxTimeoutA 0&amp;, \"\u3086\u3063\u304f\u308a\u3057\u3066\u3044\u3063\u3066\u306d\uff01\uff01\uff01\", \"\u3086\u3063\u304f\u308a\u9589\u3058\u308b\u30e1\u30c3\u30bb\u30fc\u30b8\", 0, 0&amp;, 60 * 1000\r\n    \r\n    For i = 0 To 5\r\n        MessageBoxTimeoutA 0&amp;, \"type=\" &amp; i, \"1\u79d2\u3067\u9589\u3058\u308b\u30e1\u30c3\u30bb\u30fc\u30b8\", i, 0&amp;, 1 * 1000\r\n    Next\r\n    \r\n    For i = 0 To 5\r\n        MessageBoxTimeoutA 0&amp;, \"\u91cd\u5927\u306a\u30e1\u30c3\u30bb\u30fc\u30b8\" &amp; Chr(13) &amp; \"type=\" &amp; i &amp; \" + 16\", \"1\u79d2\u3067\u9589\u3058\u308b\u30e1\u30c3\u30bb\u30fc\u30b8\", i + 16, 0&amp;, 1 * 1000\r\n    Next\r\n    \r\n    For i = 0 To 5\r\n        MessageBoxTimeoutA 0&amp;, \"\u8b66\u544a\u30af\u30a8\u30ea\" &amp; vbCrLf &amp; \"type=\" &amp; i &amp; \" + 32\", \"1\u79d2\u3067\u9589\u3058\u308b\u30e1\u30c3\u30bb\u30fc\u30b8\", i + 32, 0&amp;, 1 * 1000\r\n    Next\r\n    \r\n    \r\n    For i = 0 To 5\r\n        MessageBoxTimeoutA 0&amp;, \"\u8b66\u544a\u30e1\u30c3\u30bb\u30fc\u30b8\" &amp; vbCrLf &amp; \"type=\" &amp; i &amp; \" + 48\", \"1\u79d2\u3067\u9589\u3058\u308b\u30e1\u30c3\u30bb\u30fc\u30b8\", i + 48, 0&amp;, 1 * 1000\r\n    Next\r\n    \r\n    For i = 0 To 5\r\n        MessageBoxTimeoutA 0&amp;, \"\u60c5\u5831\u30e1\u30c3\u30bb\u30fc\u30b8\" &amp; vbCrLf &amp; \"type=\" &amp; i &amp; \" + 64\", \"1\u79d2\u3067\u9589\u3058\u308b\u30e1\u30c3\u30bb\u30fc\u30b8\", i + 64, 0&amp;, 1 * 1000\r\n    Next\r\n    \r\n    \r\n    MessageBoxTimeoutA 0&amp;, _\r\n    \"\u3000\u3000\u3000\uff3f\uff3f\uff3f_\u2227\u2227\u3000\u3000\uff0f\uffe3\uffe3\uffe3\uffe3\uffe3\uffe3\uffe3\uffe3\" &amp; vbCrLf &amp; _\r\n    \"\u3000\uff5e'\u3000\uff3f\uff3f__(,,\uff9f\u0414\uff9f)\uff1c\u3000\u6b21\u306b\u901d\u3063\u3066\u3088\u3057\uff01\" &amp; vbCrLf &amp; _\r\n    \"\u3000\u3000 \uff35U \u3000 \u3000\uff35 U\u3000\u3000\uff3c\uff3f\uff3f\uff3f\uff3f\uff3f\uff3f\uff3f\uff3f\" _\r\n    , \"10\u79d2\u3067\u9589\u3058\u308b\u30e1\u30c3\u30bb\u30fc\u30b8\", 0 + 64, 0&amp;, 10 * 1000\r\n\r\nEnd Sub<\/code><\/pre>\n<\/div>\n<h2><\/h2>\n<div class=\"hcb_wrap\">\n<p>VBScript<\/p>\n<pre class=\"prism line-numbers lang-ts\" data-lang=\"TypeScript\"><code>&lt;!-- :\r\n@%windir%\\System32\\cscript.exe \/\/nologo \"%~f0?.wsf\"\r\n@exit \/b %errorlevel%\r\n--&gt;\r\n&lt;job&gt;\r\n&lt;script language=\"VBScript\"&gt;\r\n\tSet objShell = WScript.CreateObject(\"WScript.Shell\")\r\n\tobjShell.Popup \"\u304a\u306f\u3088\u3046\",5, \"5\u79d2\u3067\u9589\u3058\u308b\u30e1\u30c3\u30bb\u30fc\u30b8\",0\r\n\t\r\n\tobjShell.Popup \"\u3053\u3093\u3093\u3061\u306f\",5, \"5\u79d2\u3067\u9589\u3058\u308b\u30e1\u30c3\u30bb\u30fc\u30b8\",1\r\n\t\r\n\tFor i = 0 To 5\r\n\t\tobjShell.Popup \"type=\" &amp; i, 1 , \"1\u79d2\u3067\u9589\u3058\u308b\u30e1\u30c3\u30bb\u30fc\u30b8\", i\r\n\tNext\r\n\tFor i = 0 To 5\r\n\t\tobjShell.Popup \"\u91cd\u5927\u306a\u30e1\u30c3\u30bb\u30fc\u30b8\" &amp; Chr(13) &amp; \"type=\" &amp; i &amp; \" + 16\",1, \"1\u79d2\u3067\u9589\u3058\u308b\u30e1\u30c3\u30bb\u30fc\u30b8\",i+16\r\n\tNext\r\n\tFor i = 0 To 5\r\n\t\tobjShell.Popup \"\u8b66\u544a\u30af\u30a8\u30ea\" &amp; Chr(13) &amp; \"type=\" &amp; i &amp; \" + 32\",1, \"1\u79d2\u3067\u9589\u3058\u308b\u30e1\u30c3\u30bb\u30fc\u30b8\",i+32\r\n\tNext\r\n\r\n&lt;\/script&gt;\r\n&lt;\/job&gt;<\/code><\/pre>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u81ea\u52d5\u7684\u306b\u9589\u3058\u308b\u5236\u9650\u6642\u9593\u4ed8\u304dMsgBox #If Win64 Then &#8216; Excel \u304c64\u30d3\u30c3\u30c8\u7248 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2377,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[34,35],"tags":[],"class_list":["post-2368","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-vba","category-vbscript"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"http:\/\/oreoreki.gotdns.ch\/wp-content\/uploads\/sites\/2\/2022\/05\/mqdefault-4.jpg","jetpack_shortlink":"https:\/\/wp.me\/p9WqRX-Cc","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"http:\/\/oreoreki.gotdns.ch\/index.php?rest_route=\/wp\/v2\/posts\/2368","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/oreoreki.gotdns.ch\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/oreoreki.gotdns.ch\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/oreoreki.gotdns.ch\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/oreoreki.gotdns.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2368"}],"version-history":[{"count":6,"href":"http:\/\/oreoreki.gotdns.ch\/index.php?rest_route=\/wp\/v2\/posts\/2368\/revisions"}],"predecessor-version":[{"id":2374,"href":"http:\/\/oreoreki.gotdns.ch\/index.php?rest_route=\/wp\/v2\/posts\/2368\/revisions\/2374"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/oreoreki.gotdns.ch\/index.php?rest_route=\/wp\/v2\/media\/2377"}],"wp:attachment":[{"href":"http:\/\/oreoreki.gotdns.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2368"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/oreoreki.gotdns.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2368"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/oreoreki.gotdns.ch\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2368"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}