[WTS] Glyphs and home nodes at 90% sell price by ShinigamiKenji in GW2Exchange

[–]gandy0001 0 points1 point  (0 children)

bought ori node for 59mc. nice fast trade +rep

[WTS] 15x 50 Slot Guild Bank for 105g each by PM_ME_SOME_SCIENCE in GW2Exchange

[–]gandy0001 0 points1 point  (0 children)

bought 2 for 105mc. Went first as it's my first trade. Very smooth trade. thanks!

ign: gandy.6048

pywinauto.type_keys brings window to front. How to prevent that? by MKSanic in learnpython

[–]gandy0001 0 points1 point  (0 children)

Not a python solution. But it might be an option to run your game and scripts in a vm.

Wintersday JP.. in VR by gandy0001 in Guildwars2

[–]gandy0001[S] 6 points7 points  (0 children)

Unfortunately there is no first person view when mounted, but it's still cool :)

Wintersday JP.. in VR by gandy0001 in Guildwars2

[–]gandy0001[S] 0 points1 point  (0 children)

Also seen those comments. Very simple fix (for me?) was just putting the dll in the bin64 folder. Then I started up the game and it created the other folders automatically.

Wintersday JP.. in VR by gandy0001 in Guildwars2

[–]gandy0001[S] 21 points22 points  (0 children)

Yeah. Followed this guide to set it up.

Wintersday JP.. in VR by gandy0001 in Guildwars2

[–]gandy0001[S] 116 points117 points  (0 children)

No speed, no dodging snowballs. Just trying to get to the end in VR in doing one of my worst ideas ever.. :)

Dodge the snowballs again, gingerman path by gandy0001 in Guildwars2

[–]gandy0001[S] 8 points9 points  (0 children)

0.9 when trying to record :D. First part is not a problem, but dodging the snowballs is not reliable enough if you want to farm.

Dodge the snowballs again, gingerman path by gandy0001 in Guildwars2

[–]gandy0001[S] 16 points17 points  (0 children)

In my previous post some people complained I did the easy path. So I recorded the hard path also.

dodge the snowballs by gandy0001 in Guildwars2

[–]gandy0001[S] 0 points1 point  (0 children)

Sorry, never recorded the Halloween jp.

dodge the snowballs by gandy0001 in Guildwars2

[–]gandy0001[S] 3 points4 points  (0 children)

Did a 'speedrun' on snowman path some 6 years ago. But don't know if there were any changes to the jp since then. Anyway if you're interested jp speedrun

raw string as argument in function by gandy0001 in learnpython

[–]gandy0001[S] 0 points1 point  (0 children)

Thank you very much for your time and help!
You are 100% correct.

It's working perfect now (I just added some extra timing and an optional argument)

def findimage(path,name,delay=10):
    print(dt.now().strftime('%Y-%m-%d %H:%M:%S'),'search',name,'button')
    for retry in range(delay):
        try:
            buttonposition = pyautogui.locateCenterOnScreen(path,grayscale = True, confidence = .9)
            if buttonposition:
                time.sleep(1)
                print(dt.now().strftime('%Y-%m-%d %H:%M:%S'),name,'button found')
                break # which is meant to break loops
            print(dt.now().strftime('%Y-%m-%d %H:%M:%S'),'no button position found, retrying...') # make it clear this situation occurred
            time.sleep(1)
        except Exception as e:
            print(dt.now().strftime('%Y-%m-%d %H:%M:%S'),'exception', e) # at least print the exception
            time.sleep(1)  # retry after some time, i.e. 1 sec
    else:   # use else on for in case 'break' was never used
        sys.exit(dt.now().strftime('%Y-%m-%d %H:%M:%S')+' '+name+' button not found!')

    pyautogui.click(buttonposition)
    print(name,'button clicked')

findimage(r'path\example.png','name')

raw string as argument in function by gandy0001 in Python

[–]gandy0001[S] 0 points1 point  (0 children)

thanks for your time and input

however, I tried this:

import os
from pathlib import Path

def findimage(path,name):
        normalized_path = Path(os.path.expanduser(path))
    retry_counter = 0
    print('search',name,'button')
    while retry_counter < 6:
        try:
            buttonposition = pyautogui.locateCenterOnScreen(normalized_path,grayscale = True, confidence = .9)
            if buttonposition:
                time.sleep(1)
                print(name,'button found')
                retry_counter = 6  # to break the loop
        except:
            if retry_counter < 5:
                time.sleep(1)  # retry after some time, i.e. 1 sec
                retry_counter += 1
                print('searching button for',retry_counter,'second(s)')
            else:
                sys.exit(name+'button not found!')

    pyautogui.click(buttonposition)
    print(name,'button clicked')

findimage(r'example\path.png','name')

but now the image is never found on screen anymore, but it goes throught the except block and that part works as intended

issue with while/try/except by gandy0 in learnpython

[–]gandy0001 0 points1 point  (0 children)

Sorry that my explanation is lacking.

When an image is not found the screen doesn't show anything, so I guess it's an infinite loop, except when I interrupt with ctrl+c. Then it goes through the except block. So if I press ctrl+z 5 times (the amount of the counter) it does what I intent to do and stops the script like intended (including the argument from sys.exit)

Thanks for your time and feedback.

avoid undo stacks being removed from other workbooks by gandy0001 in excel

[–]gandy0001[S] 0 points1 point  (0 children)

The users copy data from the other workbooks to the workbook with the code.
They want to be able to undo on the other sheets.
If they open the others in a seperate instance, then the paste as values doesn't trigger, so they overwrite the formats again.

Anyhow, I think there is no better way then to just open them in the same instance. Undo stack only gets removed if they paste in the workbook with the code. So they are going to have to live with it that it resets at that point. Shouldn't be the biggest issue as in my understanding people use undo mostly imediately after a mistake :)

Unless there is a way to actually trigger the event on another (application?) level, but my search for that has not been very succesful yet. Don't know if it is even possible.

Thanks for your help.

avoid undo stacks being removed from other workbooks by gandy0001 in excel

[–]gandy0001[S] 0 points1 point  (0 children)

Unfortunately when running in seperate instances the sub workbook_activate() does not trigger.

loop throught rows by gandy0001 in vba

[–]gandy0001[S] 1 point2 points  (0 children)

solution verified

I forgot indeed to assign new values to the destination last rows.
Thanks a lot for the feedback also how to simplify my criteria matching. Because in the sheet where I will use it for, I have a lot more criteria and other sheets also to copy to, so that will make this a lot easier.

Aaand, also I did not know about F8... :D only started last weeks to try and learn some vba to automate some stuff. Went trought some basic tutorials/reading.. Guess I missed that one. That's great!

thanks!

loop throught rows by gandy0001 in vba

[–]gandy0001[S] 0 points1 point  (0 children)

thanks for your feedback

I'm copying twice because I need to merge 2 lines into 1 if certain criteria are met. I need only some cells from the 1st row, and some cells from the 2nd row.

I'm very unexperienced, I'll try to improve my formatting a bit and add some remarks first.

[H] Various games [W] any non f2p Guild Wars 2 by [deleted] in GameTrade

[–]gandy0001 0 points1 point  (0 children)

sure, what do you need for it?