Jump to content

undcover

Members
  • Posts

    7
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

undcover's Achievements

  1. I'm sure you've experienced this before while automating some apps and things seem to work half way, like you can focus on a window but you can't control it's controls. if that's you, then don't worry just check if your C# app has the same username as the target process this problem will go away, this is useful to know if your target app runs as an administrator. ANYWAYS, is there a setting or a way to use a certain user profile as the option for AutoitX it's really hard for me now as my target app doesn't run on any Microsoft account for some weird money saving reason and debugging/ testing becomes a nightmare.
  2. Damn, it works fine on my virtual Win11 (even though I don't have the correct CPU for it...) Seems to be a problem in that exact PC which means I'm gonna have to spend lots of time understanding why it's crashing... Didn't even have to install Autoit or any other regedit trick for it to work. currently creating VM to try debugging on my own pc
  3. No worries just solved it, it was way easier than i thought i just had a brain freeze for few hours.
  4. Public Class Form2     Dim ait As New AutoItX3     Public visibleform     Function firstloop()         visibleform = ait.ControlCommand("mytest app", "", "[NAME:wacontact]", "IsVisible", "")         If visibleform = 1 And Form1.Visible = True Then             Form1.Hide()         End If         secondloop()     End Function     Function secondloop()         visibleform = ait.ControlCommand("mytestapp", "", "[NAME:wacontact]", "IsVisible", "")         If visibleform = 0 And Form1.Visible = False Then             Form1.Show()         End If         firstloop()     End Function     Private Sub Form2_Load(sender As Object, e As EventArgs) Handles MyBase.Load         firstloop()     End Sub End Class This self made loop didn't work for me either, but should give you an idea of my problem.
  5. I have so many ways to check if the window is minimized or the control hidden, It works fine... my problem is with constantly checking that state and adjusting my form shown, hidden status accordingly. (the app has no windows) every loop i do ends up crashing.
  6. Hello, I'm automating part of the note taking ability of my old bad POS, I managed to do much of the heavy lifting in the past weeks, I can finally do everything i want and more. Now I have a form with two buttons that expand the form to show a note taking beast that can lets us escape the hell of the one way editing the POS actually support (no cursor just delete. want to change the time on that order better delete everything and start the note from scratch, well not anymore) Now i'm stuck, my form shows up as two buttons over the POS window, however I need it to go away when I minimized the POS or switch to a different page or application, I was able to do so by doing a while loop, it worked badly as it will repeat the show command infinitely and if i break the loop then there's no way to restart the loop if the user didn't interact with the buttons directly. I have many ways I could know when controls are visible and it worked, I just don't have a way of constantly checking for this without straining the CPU, I know if I work it somehow I could do a while loop that can work, but it'll be CPU intensive. (Bad POS entails BAD PC) Should I make another form that does the loop? can I make the loop slower ? I'm using VB.net VS 2017 with AutoitX dll. EDIT: Hello anyone who searched for this, if you're and idiot like me and forgot that Timers exist then this will jog your memory Add a timer to your form, set the timer for 1 sec intervals (dealers choice) start your timer (within form load or manually) Timer1.start() then double click the timer to create a Timer tick (for my case the control visibility test i want to make each second) it should look something like this :     Private Sub timer1_Tick(sender As Object, e As EventArgs) Handles timer1.Tick         dim visibleform = ait.ControlCommand("my app", "", "[NAME:wacontact]", "IsVisible", "")         If visibleform = 0 Then             Me.Hide() ElseIf visibleform = 1 And Me.Visible = False Then ' to prevent the timer ticks from interupting any sendkeys or something we put two conditions. Me.Show() End If     End Sub remarks: ait. is the call I set for Autoit DLL.
  7. I have an old app written in Delphi, Autoit can target it's control but can't for some reason get actual text from it. What I tried: ControlGetText gets me the original text set by the programmer (generic programming text) ControlSendText replaces that text, but doesn't show that in the application, so I can't use it. (I can still send it with ControlClick then sending keys and that's useful but I still need to be able to read the text back) Enabling the control or disabling it, has no effect. even hiding the control doesn't show a secret control behind it I tried listing all the instances of the application with no luck. (with the edit button pressed or without) The only way I was able to get any data from that text box, was if i clicked on a button that enabled me to write to the textbox, (no cursor just backspace allowed) and then clicking on the textbox and hitting Ctrl+A, Ctrl+C. Is it possible via Autoit, vb.net or others to alter the way that box behaves, to allow normal text box editing instead of the backward way it's allowing me to edit now? thank you.
×
×
  • Create New...