Old 01-13-2018, 03:35 AM   #1
snooks
Human being with feelings
 
Join Date: Sep 2015
Posts: 1,516
Default Could a Mac user please test this Python code...

It's in the ReaChorder thread, which has been around for a while so you might not have seen the possible fixes for Tkinter GUI windows in Python ReaScript on Mac that Veto has put together on page 2...

https://forum.cockos.com/showthread.php?t=200185&page=2

It would be good to have a answer to this question.

Code:
import sys 
import os 
import tkinter 

sys.argv=["Main"] 

root=tkinter.Tk() 

### 1 
root.lift() 

### 2 
#os.system('''/usr/bin/osascript -e 'tell app "Finder" to set frontmost of process "Python" to true' ''') 

### 3 
#os.system('''/usr/bin/osascript -e 'tell app "Finder" to set frontmost of process "python" to true' ''') 

### 4 
#root.attributes('-topmost', 1) 
#root.update() 
#root.attributes('-topmost', 0) 

### 5 
#root.iconify() 
#root.deiconify() 

lbl=tkinter.Label(root, text="Hello World") 
lbl.pack() 
root.mainloop()

Last edited by snooks; 01-21-2018 at 03:53 AM.
snooks is offline   Reply With Quote
Old 01-13-2018, 04:01 AM   #2
vanhaze
Human being with feelings
 
vanhaze's Avatar
 
Join Date: Jul 2012
Location: Netherlands
Posts: 4,272
Default

Thank you for your contribution snooks.

IMHO, it would be very convenient to have a separate thread for OSX users who want to use Reachorder.
Cause the current Reachorder thread is becoming really large and it becomes cumbersome to lookup.

In the new OSX thread, it would be nice for starters, for rookies, to have a very detailed explanation of:

- which exact version of Python-OSX to install, and where exactly to get that version.
Sidenote: I am on OSX 10.13 and i can't even get a regular python installer (from python website) to install, cause it gives me an error that there is nothing to install
So had to look for other ways to install python (like via homebrew).

- Where to get the right installer(s) for installing Tkinter OSX and exactly what to do to have it installed correctly.

I think these above 2 are really important: to be sure you have correct version of python-osx correctly installed and also Tkinter.
When you know these installs are 100% correct, dan we can go from there to handle the issue(s) that occur when executing Reachorder.
vanhaze is offline   Reply With Quote
Old 01-13-2018, 02:32 PM   #3
vanhaze
Human being with feelings
 
vanhaze's Avatar
 
Join Date: Jul 2012
Location: Netherlands
Posts: 4,272
Default

Hi Veto, i respect your everlasting help to this thread, you have good Karma !

I just ran that "Hello World" python script again (i have done some Reaper beta updates in between, and it has been awhile) and here is the outcome:

- I execute the script in Reaper Main Window.
A popup Window appears, stating "API test Hello, world"

- I opened MIDI editor, then opened Action list (choosing section Main) and ran the script:
A popup Window appears, stating "API test Hello, world"

- Using Python OSX 3.3 (is seen by Reaper)
Sidenote: I am not sure anymore how exactly i installed this Python version.
I do know that the v3.3 installer from the official python website gave me an error when i started install "can't install because there is nothing to install"
I think i then installed 3.3 by means of homebew.

- Reaper Reaper 5.71pre12
- OSX 10.13.2
- I installed this version of Tkinter:
https://www.python.org/download/mac/...vetcl-8-5-18-0
vanhaze is offline   Reply With Quote
Old 01-14-2018, 02:02 AM   #4
vanhaze
Human being with feelings
 
vanhaze's Avatar
 
Join Date: Jul 2012
Location: Netherlands
Posts: 4,272
Default

Hi Veto,

I made the test script and ran it.

Outcome:

A popup window with this:

3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29 2012, 01:25:11)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)]

8.5
vanhaze is offline   Reply With Quote
Old 01-19-2018, 02:21 AM   #5
snooks
Human being with feelings
 
Join Date: Sep 2015
Posts: 1,516
Default

So near, yet so far. Does any other Mac user want to test this?
snooks is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 11:20 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.