找回密码
 加入
搜索
查看: 1652|回复: 3

[AU3基础] 请教一个结构体嵌套的问题

  [复制链接]
发表于 2018-7-28 10:26:17 | 显示全部楼层 |阅读模式
  // an action assocated with a component
    typedef struct AccessibleActionInfoTag {
        wchar_t name[SHORT_STRING_SIZE];        // action name
    } AccessibleActionInfo;

    // all of the actions associated with a component
    typedef struct AccessibleActionsTag {
        jint actionsCount;                // number of actions
        AccessibleActionInfo actionInfo[MAX_ACTION_INFO];        // the action information
    } AccessibleActions;[/mw_shl_code]
ps:两个常量都为256
AccessibleActions结构体中有嵌套一个结构体AccessibleActioninfo,
这个是自己瞎想的一个
[mw_shl_code=actionscript3,true]$actions = DllStructCreate("struct;int;ptr[256];endstruct")
For $i = 1 To 256
        $actionname = DllStructCreate('wchar[256]')
        DllStructSetData($actions, 2, DllStructGetPtr($actionname), $i)
Next
$pAction = DllStructGetPtr($actions)

行不通 自己也感觉不合理 各位有时间看看错在哪里?
发表于 2018-7-28 13:49:37 | 显示全部楼层
for $i = 1 to 256
  [语句]
  for $j = 1 to 256
    [语句]
  next
next
发表于 2018-8-7 22:23:20 | 显示全部楼层
在结构中依次声明,比如结构A='int;int;结构B;int',结构B='short;short'

那么结构A实际上等于'int;int;short;short;int'


http://www.autoit3.cn/thread-55519-1-1.html
 楼主| 发表于 2018-8-14 15:51:29 | 显示全部楼层
tubaba 发表于 2018-8-7 22:23
在结构中依次声明,比如结构A='int;int;结构B;int',结构B='short;short'

那么结构A实际上等于'int;int;sh ...

你好 谢谢解答
我还真没试过这样嵌套
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-3-28 21:29 , Processed in 0.071036 second(s), 19 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表