Beispiel #1
0
def confirm(properties=None, start_condition=None, notes=[]):

    if properties is None:
        properties = {}

    print()

    if len(properties) > 0:
        print('Properties:')
        for (k, v) in properties.items():
            print('  {0}: {1}'.format(k, v))
        if start_condition is not None:
            print('  Start Condition: {0}'.format(start_condition))

        for n in notes:
            print('Note: {0}'.format(n))

    print('Press Enter to confirm or Ctrl+C to cancel. ', end='')
    nox.do_input()

    print(
        '************************************** WARNING *************************************************'
    )
    print(
        '* Please watch the macro for the first few cycles to make sure everything is working as		*\n'
        '* intended.  If you are selling or grinding gear, make sure your Sell All and Grind All screen *\n'
        '* is pre-configured with the appropriate values.  For extra security, make sure all valuable   *\n'
        '* items are locked.																			*\n'
        '************************************************************************************************'
    )

    nox.wait(500)
Beispiel #2
0
        ])

    print()
    for (n, (desc, fn)) in enumerate(macro_generators):
        print('{0}) {1}'.format(n + 1, desc))

    macro_number = nox.prompt_user_for_int(
        'Enter the macro you wish to generate: ',
        min=1,
        max=len(macro_generators))

    (macro_name, file_path) = nox.load_macro_file()

    (desc, fn) = macro_generators[macro_number - 1]

    # Generate the macro
    fn()

    # At this point we're back where we started and the macro can loop.
    nox.close()

    print('File {0} successfully written.'.format(file_path))
except SystemExit:
    pass
except:
    print('Something happened.  Please report this and paste the below text.')
    import traceback
    traceback.print_exc()
    print('Press any key to exit')
    nox.do_input()