代码不能正常运行,因为多了19行的console.log(), 如果去掉这行就正常了,但这是为什么呢?

酷酷的就 发布于 2024/12/28 00:08
阅读 146
收藏 0

阅读《2024 中国开源开发者报告》赢大奖,扫码申请享特权

import time;
import console; 
import process;

thread.create(function(){
    sleep(1000)
    import console; 
    import thread; 
    var tid=thread.getId();
    console.log("222.thread.getId()",thread.getId()) 
    thread.set("222thread",thread.getId() ); 
    sleep(1000)    
    import winex;
    var hwnd,线程ID,进程ID = winex.find( ,,,tid )  ;
    console.log("winex.find(222)main.222.thread()",hwnd,线程ID,进程ID );
    sleep(4000); 
}) ;
 
console.log("process.getId()"+process.getId());

sleep(2000)
 
 for(i=0;10;1){
    import winex;
    var hwnd,线程ID,进程ID = winex.find( ,,,thread.get("222thread") )  ;
    import console; 
    console.log("winex.find()main.thread()",i,hwnd,线程ID,进程ID );
    sleep(2000);
}

console.pause();

 

加载中
0
酷酷的就
酷酷的就

学习这个aardio真累, 好好的代码里面加入一行日志信息就不能运行了,真的有点恶心的感觉,浪费了一周才查出问题所在,结果还不知道为啥。

OSCHINA
登录后可查看更多优质内容
返回顶部
顶部