February 15, 20197 yr Hi! Is there a way for the bot to actually press a specific keyboard button (for example 'n' or numpad 9)?
February 15, 20197 yr robot Manager.Helpful.Keyboard.Press Key(process.MainWindowHandle, System.Windows.Forms.Key.F1); change f1 with the numpad key
February 15, 20197 yr Author I got this error using this "robotManager.Helpful.Keyboard.PressKey(process.MainWindowHandle, System.Windows.Forms.Key.NumPad9);" : : error CS0103: A(z) „process” név nem szerepel ebben a környezetben. In english--> name doesnt exist in this enviroment and error CS0234: A(z) „Key” típus- vagy névtérnév nem szerepel a(z) „System.Windows.Forms” névtérben (esetleg hiányzik egy szerelvényre mutató hivatkozás). --> Key type or namespace does not exist in System.Windows.Forms namespace (or maybe its missing reference). Is it some kind of .NET error?
February 19, 20197 yr Hello, if you want press key to external program window use code like: Quote var p = System.Diagnostics.Process.GetProcessesByName("ExeFileNameWithoutExtension");foreach (var process in p){ robotManager.Helpful.Keyboard.PressKey(process.MainWindowHandle, System.Windows.Forms.Keys.F1);} Replace ExeFileNameWithoutExtension by file name (without .exe) You can replace F1 by https://docs.microsoft.com/fr-fr/dotnet/api/system.windows.forms.keys?view=netframework-4.7.2 If you want press key to Wow window: Quote robotManager.Helpful.Keyboard.PressKey(wManager.Wow.Memory.WowMemory.Memory.WindowHandle, System.Windows.Forms.Keys.F1);
February 19, 20197 yr Author 1 hour ago, Droidz said: Hello, if you want press key to external program window use code like: Replace ExeFileNameWithoutExtension by file name (without .exe) You can replace F1 by https://docs.microsoft.com/fr-fr/dotnet/api/system.windows.forms.keys?view=netframework-4.7.2 If you want press key to Wow window: It still gives me a compile error: Quote [E] 12:47:27.026 - Compilator Error : c:\Users\Kiccsi\AppData\Local\Temp\5vor25un\5vor25un.0.cs(23,22) : error CS0246: The type or namespace name 'Forms' could not be found (are you missing a using directive or an assembly reference?) How can I add the System.Windows.Forms.dll to the program as reference, so it could use its namespace? Edited February 19, 20197 yr by infamous11 posted too early
February 19, 20197 yr 12 minutes ago, infamous11 said: It still gives me a compile error: How can I add the System.Windows.Forms.dll to the program as reference, so it could use its namespace? Rightclick references, under the Assemblies category on the left find System.Windows.Forms and tick it in the list Edit: Sorry I misunderstood. Add using System.Windows.Forms; to the top of the file Edit2: Or did i? Edited February 19, 20197 yr by Marsbar
February 19, 20197 yr Author 35 minutes ago, Marsbar said: Rightclick references, under the Assemblies category on the left find System.Windows.Forms and tick it in the list Edit: Sorry I misunderstood. Add using System.Windows.Forms; to the top of the file Edit2: Or did i? Im doing it the quester editor, so adding the using part to the top gives me this error: error CS1529: A using clause must precede all other elements defined in the namespace except extern alias declarations I know I have to add it in VS for it to work, but how do I do that? I mean I did try to do a Questprofile creating a ClassLibrary a while ago but when I when I started the bot through VS, it freezes every time at authentication. It freezes without adding anything only the dll as refrence. So can I open the wRobot in VS to edit it directly, or Im messing something up when I try to run wRobot through VS?
February 19, 20197 yr You can add imports (using derictives) in the Custom Script part of the quester editor or just add a fully qualified name for the classes you're using.
February 19, 20197 yr Author 3 hours ago, Matenia said: You can add imports (using derictives) in the Custom Script part of the quester editor or just add a fully qualified name for the classes you're using. YES! It works that way, thank you!!
Create an account or sign in to comment