iDollarsteam 13 Posted December 21, 2012 Report Share Posted December 21, 2012 Hi! I have a bot that is just a html UI and from it I open other bots ... but the problem is that when I click the UI the new bot opens minimized. How can I open the new bot as a normal window and not minimized in the windows bar?? Quote Link to post Share on other sites
VaultBoss 310 Posted December 21, 2012 Report Share Posted December 21, 2012 Check you compiling options, I think I saw there some alternatives for how the bot will open. Not sure if there are differences between the STD/PRO/DEV licenses, in this respect, though... Quote Link to post Share on other sites
iDollarsteam 13 Posted December 23, 2012 Author Report Share Posted December 23, 2012 I have tried... the only option that works..in a way... is the option that will open the bot maximized, but this will make the bot to open full screen and I don't want a bot that is 300px x 400px to be all over my screen Quote Link to post Share on other sites
iDollarsteam 13 Posted December 23, 2012 Author Report Share Posted December 23, 2012 I have used winautomation and made a little exe that opens the new bot: I call the winauto exe with shell command from the main bot and the winauto exe opens the new bot... in this way the new bot opens on the screen not on the windows bar the downside is that I can't change the extension of the new bot (it has to be exe to be opened by winauto... so I can't hide important files) and I have double the numbers of files in my software Quote Link to post Share on other sites
VaultBoss 310 Posted December 23, 2012 Report Share Posted December 23, 2012 I call the winauto exe with shell command from the main bot and the winauto exe opens the new bot... Not sure I understand WHY you needed WinAuto in order to shell the launch from within another UBot bot, when the same SHELL command would have launched the compiled bot directly? Quote Link to post Share on other sites
iDollarsteam 13 Posted December 25, 2012 Author Report Share Posted December 25, 2012 Not sure I understand WHY you needed WinAuto in order to shell the launch from within another UBot bot, when the same SHELL command would have launched the compiled bot directly?when you use shell to launch the bot directly, the bot will open in the task bar at the bottom of the screen! That was the problem I needed to be solved in this thread! and as far as I know there is no solution to this problem, even with the new "windows" commands Quote Link to post Share on other sites
HelloInsomnia 1103 Posted December 31, 2012 Report Share Posted December 31, 2012 Yeah I am having that issue as well when it launches the program it gets stuck on the shell command and the program starts minimized. I tried to use a thread to get past the part where it gets stuck and then set the active window but that didn't work either then it just gets stuck on that - kind of frustrating. Quote Link to post Share on other sites
k1lv9h 76 Posted December 31, 2012 Report Share Posted December 31, 2012 Hi, My notes on code:Shell cmd.exe /C runs compiled bot/program and waits until finshed.Shell cmd.exe /C start runs compiled bot/program and does not wait until finished.Running compiled bots/programs with VBS code no waiting. Will hide compiled bot/program window from Window's taskbar until the running compiled bot/program is clicked on. Just some ideas. Maybe they could be useful. Sample code: ui check box("Run external bot wait", #runexternalbotwait) ui check box("Run bot with /auto", #runexternalbotauto) ui check box("Use VBS (No Wait)", #runexternalbotwithvbs) wait(5) navigate("http://www.yahoo.com/", "Wait") wait for browser event("Everything Loaded", 30) wait(10) set(#bottorun, "C:\\dnld\\ubotstudio\\samplescript-v4\\sample-run-auto-001.exe", "Global") set(#bottorun, "C:\\dnld\\ubotstudio\\samplescript-v4\\test space\\sample-run-auto-001.exe", "Global") set(#vbsfilesave, "{$special folder("Application Data")}\\ubot-run-invisible.vbs", "Global") set(#runbotwithauto, $nothing, "Global") if($comparison(#runexternalbotauto, "=", "true")) { then { set(#runbotwithauto, " /auto", "Global") } else { } } set(#runbotstart, $nothing, "Global") if($comparison(#runexternalbotwait, "=", "false")) { then { set(#runbotstart, " start \"Ubot cmd.exe\" ", "Global") } else { } } if($comparison(#runexternalbotwithvbs, "=", "true")) { then { runviavbs() } else { shell("cmd.exe /C {#runbotstart} \"{#bottorun}\" {#runbotwithauto}") } } define runviavbs { clear list(%vbspgm) set(#vbspgmp1, "Option Explicit dim strArgument dim objArgs dim numofargs dim i dim spc strArgument=\"\" \'Get the command line arguments Set objArgs = WScript.Arguments numofargs = objArgs.count - 1 spc=\" \" \' run arg script invisible no cmd window ", "Global") add list to list(%vbspgm, $list from text(#vbspgmp1, $new line), "Don\'t Delete", "Global") if($comparison(#runexternalbotauto, "=", "true")) { then { set(#vbspgmp2, "if numofargs = 1 then CreateObject(\"Wscript.Shell\").Run \"\"\"{#bottorun}\"\" /auto\", 0, False end if ", "Global") } else { set(#vbspgmp2, "if numofargs = 0 then CreateObject(\"Wscript.Shell\").Run \"\"\"{#bottorun}\"\"\", 0, False end if ", "Global") } } add list to list(%vbspgm, $list from text(#vbspgmp2, $new line), "Don\'t Delete", "Global") set(#vbspgmp3, " wscript.quit", "Global") add list to list(%vbspgm, $list from text(#vbspgmp3, $new line), "Don\'t Delete", "Global") save to file(#vbsfilesave, %vbspgm) shell("wscript.exe \"{#vbsfilesave}\" \"{#bottorun}\" {#runbotwithauto}") wait(2) delete file(#vbsfilesave) clear list(%vbspgm) } wait(5) navigate("http://www.bing.com/", "Wait") wait for browser event("Everything Loaded", 30) wait(5) Kevin 2 Quote Link to post Share on other sites
LazyBotter 188 Posted January 12, 2013 Report Share Posted January 12, 2013 Use a .bat file within the folder of the bot.exe and run the .bat with the shell command. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.