簡體   English   中英

無法使用Ruby 2.0在Windows 7上打開Locknote

[英]Unable to open Locknote on Windows 7 using Ruby 2.0

我運行了這段代碼,然后所做的就是將我帶到可執行文件的文件夾中。 我必須單擊可執行的應用程序才能將其打開。 這不是應該自動打開嗎?

  require 'Win32API'
    def user32(name, param_types, return_value)
      Win32API.new 'user32', name,param_types, return_value
    end
    find_window = user32 'FindWindow', ['P', 'P'], 'L'
    system 'start "" "C:\Program Files (x86)\locknote\LockNote 1.0.5"'
    sleep 0.2 while (main_window = find_window.call \
    nil, 'Steganos LockNote' ) <= 0
    puts "The main window's handle is #{main_window}."

也許LockNote 1.0.5.exe是文件名?

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM