Jump to content

evernote_evan

Level 1
  • Posts

    1
  • Joined

  • Last visited

About evernote_evan

evernote_evan's Achievements

0

Reputation

  1. 原来用 evernote,最近准备转到 obsidian,网上查到用 joplin 批量把 enex 文件转成 md 文件.目前遇到一个问题,有二百多个加密过的文件,查了一下没办法批量解密, 目前只能手动一个个点击解密 我通过 chatgpt 用 python 脚本写了一个自动点击操作的代码,需要如何修改达到循环遍历每一条笔记的自动操作? import pyautogui import time import ctypes # 设置鼠标移动和点击的延迟时间,根据需要进行调整 pyautogui.PAUSE = 0.5 # 打开 Evernote 应用程序(需要根据您的操作系统和应用程序位置进行调整) pyautogui.press('win') # 模拟按下 Windows 键 pyautogui.typewrite('Evernote Legacy.exe') # 输入 Evernote 应用程序的名称 pyautogui.press('enter') # 模拟按下回车键 # 等待 Evernote 打开 time.sleep(5) # 移动鼠标到 Evernote 笔记列表的位置并点击 # 这里需要根据您的屏幕分辨率和 Evernote 窗口大小进行调整 note_list_x = 300 note_list_y = 200 pyautogui.moveTo(note_list_x, note_list_y) pyautogui.click() # 循环处理所有笔记 while True: # 移动鼠标到笔记内容区域并点击 note_content_x = 500 note_content_y = 400 pyautogui.moveTo(note_content_x, note_content_y) pyautogui.click() # 等待笔记内容加载完成 time.sleep(2) # 判断是否有加密按钮,如果没有则认为笔记已取消加密 encrypt_button_pos = pyautogui.locateOnScreen('encrypt_button.png') if encrypt_button_pos is None: print("未找到加密按钮") # 进行相关处理或跳出循环 break # 移动鼠标到加密按钮位置 encrypt_button_x = encrypt_button_pos.left + encrypt_button_pos.width / 2 encrypt_button_y = encrypt_button_pos.top + encrypt_button_pos.height / 2 pyautogui.moveTo(encrypt_button_x, encrypt_button_y) # 右键点击加密按钮并选择"永久解密文件" ctypes.windll.user32.mouse_event(0x0008, 0, 0, 0, 0) # 模拟按下右键 ctypes.windll.user32.mouse_event(0x0010, 0, 0, 0, 0) # 模拟释放右键 pyautogui.typewrite(['down', 'down', 'enter']) # 使用键盘模拟向下键和回车键选择"永久解密文件" # 等待解密完成 time.sleep(2) # 输出取消加密完成的提示信息 print("已取消所有笔记的加密")
×
×
  • Create New...