我正在使用下面的代码来最大化浏览器窗口。
obj = Win32API.new("user32.dll", "FindWindow", ['P','P'], 'i')
hwnd = obj.call(classname, winname)
wndConsole = Win32API.new( "user32.dll" , "ShowWindow" , ['i' , 'i'] , 'i' )
result = wndConsole.call( hwnd , 3 )
如果我通过命令行启动竹子,它们工作得很好。但是如果我通过服务启动竹子,它们就不起作用。