{"id":8494,"date":"2021-09-26T09:11:57","date_gmt":"2021-09-26T01:11:57","guid":{"rendered":"http:\/\/www.hefeiyu.com\/?p=8494"},"modified":"2021-09-30T09:38:14","modified_gmt":"2021-09-30T01:38:14","slug":"day23-fgl-%e7%9b%ae%e5%bd%95%e6%a1%a3%e6%a1%88%e5%a4%84%e7%90%86-%e5%a4%84%e7%90%86%e8%b0%81%e7%9a%84%e6%a1%a3%e6%a1%88-frontcall","status":"publish","type":"post","link":"https:\/\/www.hefeiyu.com\/?p=8494","title":{"rendered":"[day23] FGL \u76ee\u5f55\u6863\u6848\u5904\u7406-\u5904\u7406\u8c01\u7684\u6863\u6848? frontCall"},"content":{"rendered":"<h2>\u6587\u7ae0\u6765\u81ea\uff1a<a href=\"https:\/\/ithelp.ithome.com.tw\/users\/20051169\">iT \u90a6\u5e6b\u5fd9::\u4e00\u8d77\u5e6b\u5fd9\u89e3\u6c7a\u96e3\u984c\uff0c\u62ef\u6551 IT \u4eba\u7684\u4e00\u5929 (ithome.com.tw)<\/a><\/h2>\n<h2>[day23] FGL \u76ee\u5f55\u6863\u6848\u5904\u7406-\u5904\u7406\u8c01\u7684\u6863\u6848? frontCall<\/h2>\n<p>\u4e4b\u524d\u5728\u00a0<a href=\"https:\/\/ithelp.ithome.com.tw\/articles\/10261636\" target=\"_blank\" rel=\"noopener noreferrer\">\u5438\u661f\u5927\u6cd5 &#8211; IMPORT\u4e4b 1: \u4f7f\u7528extension\u6269\u5c55\u529f\u80fd<\/a>\u00a0\u4e2d\uff0c\u6709\u63d0\u5230\u300e**\u53ef\u4ee5\u4f7f\u7528 os.Path\u5957\u4ef6\u6765\u5904\u7406\u4e3b\u673a(server)\u7aef\u7684\u8def\u5f84\u3001\u6863\u6848 **\u300f\uff0c\u4f8b\u5982 DISPLAY os.Path.pwd() \u53ef\u4ee5\u6253\u5370\u51fa\u7a0b\u5e8f\u6267\u884c\u5f53\u4e0b\u7684\u8def\u5f84\u3002<\/p>\n<p>\u90a3\uff0c\u5982\u679c\u6574\u4e2a\u7684\u8fc7\u7a0b\u662f\u300e\u4ecePC\u4e0a\u4f20\u6307\u5b9a\u6863\u6848\uff0c\u5230\u4e3b\u673a\u7684\u6307\u5b9a\u8def\u5f84\u300f\uff0c\u90a3\u770b\u6765\u73b0\u884c\u5b8c\u6210\u7387\u53ea\u670933%<br \/>\n\u672c\u673a\u7684\u300e\u9009\u6863\u6848\u3001\u4e0a\u4f20\u6863\u6848\u300f\u5c31\u8981\u9760\u5176\u4ed6\u7684\u5957\u4ef6\u6765\u6267\u884c\u3002<\/p>\n<h4>\u7a0b\u5e8f\u8fd0\u884c\u5728\u4e3b\u673a\u4e0a\uff0c\u600e\u4e48\u56de\u8fc7\u5934\u6765\u63a7\u5236 PC\u7aef\u5462\uff1f<\/h4>\n<p>Genero\u6267\u884c\u65f6\uff0c\u5ba2\u6237\u7aef\u4e5f\u5fc5\u987b\u6709\u76f8\u5e94\u7684\u5ba2\u6237\u7aef\u8f6f\u4ef6 (client) \u867d\u7136\u4e3b\u8981\u5de5\u4f5c\u662f\u4ea7\u751f\u8981\u64cd\u4f5c\u7684\u753b\u9762\uff0c\u4f46\u4e5f\u53ef\u4ee5\u63a7\u5236\u5b83\u505a\u70b9\u5de5\u4f5c\u3002\u63a7\u5236\u7684\u6307\u4ee4\u5373\u79f0\u4e3a\u300e<strong>frontCall\u524d\u53f0\u6307\u4ee4<\/strong>\u300f<\/p>\n<p>\u6240\u4ee5\uff0c\u53ea\u8981\u5728\u524d\u7aef\u627f\u63a5\u6307\u4ee4\u7684\u5ba2\u6237\u7aef\uff0c\u5c31\u5177\u5907\u4e86\u63a5\u6536\u670d\u52a1\u5668\u8981\u6c42\u6267\u884c\u5de5\u4f5c\u7684\u673a\u5236\u3002\u5982 Windows\/MAC\/Linux KDE\u7684 GDC\u3001\u6d4f\u89c8\u5668\u4e0a\u7684GBC\u3001Android\/IOS\u4e0a\u7684 GMA\/GMI \u7b49\uff0c\u90fd\u53ef\u4ee5\u6267\u884c\u63a5\u6536\u7684 frontCALL \u6307\u4ee4<\/p>\n<h4>\u53ef\u4ee5\u6267\u884c\u7684\u6307\u4ee4\u90fd\u4e00\u6837\u5417\uff1f<\/h4>\n<p>\u56e0\u4e3a\u5e73\u53f0\u9650\u5236\u7684\u5173\u7cfb\uff0c\u6bcf\u4e00\u79cd client \u80fd\u652f\u6301\u7684\u6307\u4ee4\u662f\u6709\u5dee\u5f02\u7684\u3002\u6d4f\u89c8\u5668\u56e0\u4e3a\u7ba1\u5236\u7684\u6700\u4e25\u683c\uff0c\u56e0\u6b64\u8fd0\u4f5c\u5728\u6d4f\u89c8\u5668\u7684 GBC\u7f3a\u5c11\u7684\u529f\u80fd\u6700\u591a\u3002\u4f8b\u5982\u300e\u5f00\u542f\u6863\u6848\u603b\u7ba1\u3001\u4e0a\u4f20\u300f\u7b49\uff0c\u90fd\u662f\u53d7\u9650\u7684\u3002<\/p>\n<p>\u9650\u5236\u7684\u6307\u4ee4\u79cd\u7c7b\u5fc5\u987b\u67e5\u8868\u4e4b\u540e\u624d\u4f1a\u77e5\u9053\u3002<\/p>\n<h3>frontCALL\u524d\u53f0\u6307\u4ee4<\/h3>\n<p>FGL\u5217\u51fa frontCall\u7684\u6807\u51c6\u8bed\u6cd5<\/p>\n<p>CALL ui.Interface.frontCall( moduleName STRING, functionName STRING,<\/p>\n<p>[ valueList ], [ variableList ] )<\/p>\n<ul>\n<li>moduleName\u5b9a\u4e49\u4e86\u5b9e\u73b0\u51fd\u6570\u7684\u5171\u4eab\u5e93\u6216\u7c7b\u8def\u5f84\u3002<\/li>\n<li>functionName\u5b9a\u4e49\u8981\u8c03\u7528\u7684\u51fd\u6570\u7684\u540d\u79f0\u3002<\/li>\n<li>valueList\u662f\u8f93\u5165\u53c2\u6570\u7684\u5217\u8868\u3002<\/li>\n<li>variableList\u662f\u8f93\u51fa\u53c2\u6570\u7684\u5217\u8868\u3002 \u6ce8\u610f\u54e6\uff1a\u6b64\u5904\u7684\u8f93\u51fa\u3001\u8f93\u5165\u90fd\u662f\u5199\u5728\u62ec\u53f7\u5185\u7684<\/li>\n<\/ul>\n<p>\u8303\u4f8b<\/p>\n<p>main<\/p>\n<p>DEFINE info STRING<\/p>\n<p>CALL ui.Interface.frontCall(&#8220;standard&#8221;,&#8221;getenv&#8221;, [&#8220;OS&#8221;], [info] )<\/p>\n<p>DISPLAY info<\/p>\n<p>end main<\/p>\n<p>\u6267\u884c\u7ed3\u679c\uff1aWindows_NT<\/p>\n<h4>ui.Interface.frontCall &#8211; &#8220;standard&#8221; \u6863\u6848\u5904\u7406<\/h4>\n<p>\u529f\u80fd\u6709\uff1a\u5f00\u542fPC\u7aef\u6863\u6848\u603b\u7ba1\u6311\u9009\u8def\u5f84(openDir)\u3001\u6311\u9009\u6863\u6848(openFile)\u3001\u6293\u53d8\u91cf(getEnv)\u3001\u6267\u884cshell(execute)\u3001\u64ad\u653e\u58f0\u97f3\u6863(playSound)\u3001\u5b58\u6863(saveFile)<\/p>\n<h4>ui.Interface.frontCall &#8211; &#8220;standard&#8221; \u526a\u8d34\u7c3f\u5904\u7406<\/h4>\n<p>\u529f\u80fd\u6709\uff1a\u52a0\u526a\u8d34\u7c3f\u5185\u5bb9(cbAdd)\u3001\u6293\u526a\u8d34\u7c3f(cbGet)\u4e4b\u7c7b\u7684<\/p>\n<h4>ui.Interface.frontCall &#8211; &#8220;standard&#8221; \u5f00\u6d4f\u89c8\u5668<\/h4>\n<p>\u529f\u80fd\u6709\uff1a\u5f00\u6307\u5b9a\u8def\u5f84(launchURL)<br \/>\n\u4ee5\u4e0a\u6307\u4ee4\u53ef\u53c2\u8003\u00a0<a href=\"https:\/\/4js.com\/online_documentation\/fjs-fgl-manual-html\/#fgl-topics\/c_fgl_frontcalls_standard.html\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/4js.com\/online_documentation\/fjs-fgl-manual-html\/#fgl-topics\/c_fgl_frontcalls_standard.html<\/a><br \/>\n\u6709\u64cd\u4f5c\u7528\u6cd5\uff0c\u4e0e\u66f4\u8be6\u7ec6\u7684\u7ec6\u8282<\/p>\n<p>\u8fd9\u91cc\u9762\u64ad\u653e\u58f0\u97f3\u6587\u4ef6(mp3\u4e4b\u7c7b\u7684\u97f3\u8baf\u683c\u5f0f) \u6700\u4e3a\u6709\u8da3\u3002\u82e5\u5e0c\u671b\u7a0b\u5e8f\u5728\u67d0\u4e9b\u52a8\u4f5c\u51fa\u8bed\u97f3\u7684\u8bdd\uff0c\u8fd8\u53ef\u4ee5\u642d\u914d Google TTS python\u5957\u4ef6\uff0c\u4f7f\u7528 RUN \u6307\u4ee4\u4ea7\u51fa\u5bf9\u5e94\u7684\u8bed\u97f3\u6587\u4ef6\uff0c\u7136\u540e\u900f\u8fc7 playSound \u5c31\u53ef\u6ee1\u8db3\u5ff5\u51fa\u6765\u7684\u9700\u6c42\u3002( T100\u7528\u6237\u53ef\u53c2\u8003 cl_err \u4e2d\u7684\u7a0b\u5e8f\u7247\u6bb5)<\/p>\n<h3>GDC \u4e0e GBC<\/h3>\n<p>\u6211\u4eec\u66fe\u7ecf\u5728\u00a0<a href=\"https:\/\/ithelp.ithome.com.tw\/articles\/10259336\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/ithelp.ithome.com.tw\/articles\/10259336<\/a>\u00a0\u4ecb\u7ecd\u8fc7 GDC\uff0c\u4e5f\u8ba8\u8bba\u8fc7GDC\u7684\u9664\u9519\u65b9\u5f0f\u3002\u4eceGenero 1.0\u7248\u52303.20\u7248\u672c\uff0cGDC\u4f7f\u7528QT\u5de5\u5177\uff0c\u8fdb\u884c\u5404\u79cd\u5e73\u53f0\u7684\u753b\u9762\u6e32\u67d3\uff0c\u5e76\u534f\u52a9\u6267\u884c frontCALL\u3002<\/p>\n<p>\u4f46\u662f\u56e0\u5e94\u672a\u6765\u8f6f\u4ef6\u670d\u52a1\u5316\u3001\u8de8\u5e73\u53f0\u5316\uff0cGenero\u5957\u4ef6\u4ece 4.00\u7248\u672c\u8d77\uff0c\u4e0d\u518d\u4f7f\u7528QT\u8fdb\u884c\u753b\u9762\u6e32\u67d3\uff0c\u91c7\u7528\u6d4f\u89c8\u5668\u7684\u6e32\u67d3\u5f15\u64ce\u6765\u8fdb\u884c\u5ba2\u6237\u7aef\u7a0b\u5e8f\u7684\u5236\u4f5c\u3002<\/p>\n<p>\u6240\u4ee5\uff0c\u9664\u4e86\u753b\u9762\u80fd\u591f\u8de8\u5e73\u53f0\u8d8b\u5411\u4e8e\u4e00\u81f4\u7684\u4f53\u9a8c\uff0c\u300e\u8bb8\u591a\u7684 frontCALL\u90fd\u4f1a\u6d88\u5931\u7981\u7528\u300f\uff0c\u4f8b\u5982\u5f00\u542f\u6d4f\u89c8\u5668\u3001\u5ba2\u6237\u7aef\u6863\u6848\u64cd\u4f5c\u7b49\u90fd\u6d88\u5931\u3002\u4f46<\/p>\n<p>CALL ui.Interface.frontCall(&#8220;standard&#8221;, &#8220;launchURL&#8221;, [ url ], [] ) #\u5f00\u542f\u6d4f\u89c8\u7f51\u9875 url\u8981\u8bb0\u5f97\u6362<\/p>\n<p>\u8fd9\u662f\u552f\u4e00\u786e\u8ba4\u5fc5\u8981\u4fdd\u7559\u7684\u3002<\/p>\n<h3>GMA\/GMI \u79fb\u52a8\u8bbe\u5907\u7684 frontCALL<\/h3>\n<p>\u5230\u8fd9\u8fb9\u5e94\u8be5\u5c31\u53ef\u4ee5\u8054\u60f3\u5230\uff1a\u79fb\u52a8\u8bbe\u5907\u4e0a\u6709\u8bb8\u591a\u7684\u88c5\u7f6e\uff0c\u5982\u7167\u76f8\u673a\u3001\u5f55\u97f3\u673a\u3001\u626b\u6761\u5f62\u7801\u3001\u6293GPS\u3001\u4f20\u7b80\u8baf\u3001\u6253\u7535\u8bdd&#8230;\u8fd9\u4e9b\uff0c\u5c31\u662f\u900f\u8fc7 frontCALL \u6765\u9a71\u52a8\u7684\u3002<\/p>\n<p>\u79fb\u52a8\u8bbe\u5907\u7684\u8fde\u7ed3\u4e0e\u5904\u7406\uff0c\u300e\u540e\u9762\u518d\u4e13\u7ae0\u8ba8\u8bba\u300f<\/p>\n<p>\u8f6c\u8f7d\u8bf7\u6ce8\u660e\uff1a<a href=\"https:\/\/www.hefeiyu.com\">\u8d6b\u975e\u57df<\/a> &raquo; <a href=\"https:\/\/www.hefeiyu.com\/?p=8494\">[day23] FGL \u76ee\u5f55\u6863\u6848\u5904\u7406-\u5904\u7406\u8c01\u7684\u6863\u6848? frontCall<\/a><\/p>","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6765\u81ea\uff1aiT \u90a6\u5e6b\u5fd9::\u4e00\u8d77\u5e6b\u5fd9\u89e3\u6c7a\u96e3\u984c\uff0c\u62ef\u6551 IT \u4eba\u7684\u4e00\u5929 (ithome.com.tw) [day23] FGL \u76ee\u5f55\u6863\u6848\u5904\u7406-\u5904\u7406\u8c01\u7684\u6863\u6848? frontCall \u4e4b\u524d\u5728\u00a0\u5438\u661f\u5927\u6cd5 &#8211; IMPORT\u4e4b 1: \u4f7f\u7528extension [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[490,26],"tags":[750,194,901],"class_list":["post-8494","post","type-post","status-publish","format-standard","hentry","category-490","category-4gl","tag-750","tag-194","tag-901"],"_links":{"self":[{"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=\/wp\/v2\/posts\/8494","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=8494"}],"version-history":[{"count":2,"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=\/wp\/v2\/posts\/8494\/revisions"}],"predecessor-version":[{"id":8524,"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=\/wp\/v2\/posts\/8494\/revisions\/8524"}],"wp:attachment":[{"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=8494"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=8494"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=8494"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}