Pashua Mac erlaubt mir nicht, ein Bild über dem Eingabefeld auszurichten. Ich habe verschiedene Optionen ausprobiert, aber ohne Erfolg

381
James Dean

Ich habe vor kurzem angefangen, mit Pashua zu spielen, aber es scheint mir Probleme zu bereiten. Derzeit verwende ich dies für ein Shell-Skript (Bash) und habe die Beispieldatei so bearbeitet, dass sie meinen Wunschergebnissen nahe kommt, aber noch nicht dorthin gelangt ist.

Ich bemerke ein paar Dinge. Pashua hat eine Datei namens "Pashua.sh", von der ich annehme, dass sie die Anwendung sowie die Ressourcen des Pakets sucht. Jetzt frage ich mich, ob dies eine obligatorische Datei ist, das heißt:

Kann ich die Pashua-App nicht einfach mit meinem eigenen Shell-Skript aufrufen? Auch wenn ich das genaue Ziel weiß, an dem es sich nie ändern wird.

Benötige ich wirklich diese Pashua.sh-Datei?

Meine letzte Ausgabe, die ich habe, ist das Verschieben des Bildes in die linke obere Ecke. Es funktioniert einfach nicht, da sich das Eingabefeld oben befindet. Ich habe auch die absoluten Positionen für das Bild eingefügt, aber es funktioniert nicht.

#!/bin/bash -x  MYDIR="$( cd "$( dirname "$" )" && pwd )"  # Include pashua.sh to be able to use the 2 functions defined in that file source "$MYDIR/pashua.sh"  # Define what the dialog should be like # Take a look at Pashua's Readme file for more info on the syntax  conf=" # Set window title *.title = App Store  # Add a text field tf.type = password tf.x = 100 tf.y = 200 tf.label = Example textfield tf.width = 310  # Add a cancel button with default label cb.type = cancelbutton cb.tooltip = This is an element of type “cancelbutton”  db.type = defaultbutton db.tooltip = This is an element of type “defaultbutton” (which is automatically added to each window, if not included in the configuration) "  if [ -d '/Volumes/Pashua/Pashua.app' ] then # Looks like the Pashua disk image is mounted. Run from there. customLocation='/Volumes/Pashua' else # Search for Pashua in the standard locations customLocation='' fi  # Get the icon from the application bundle locate_pashua "$customLocation" bundlecontents=$(dirname $(dirname "$pashuapath")) if [ -e "$bundlecontents/Resources/AppIcon@2.png" ] then conf="$conf img.type = image img.x = 25 img.y = 25 img.maxwidth = 64 img.path = $bundlecontents/Resources/AppIcon.icns" fi   pashua_run "$conf" "$customLocation"  echo "Pashua created the following variables:" echo " tb = $tb" echo " tf = $tf" echo " ob = $ob" echo " pop = $pop" echo " rb = $rb" echo " cb = $cb" echo " chk = $chk" echo "" 
0
Von doc: * werden GUI-Elemente in der Reihenfolge angezeigt, in der sie in der Konfigurationszeichenfolge * angezeigt werden. Vielleicht müssen Sie nur die Zeilen "img. *" Näher an den Anfang von "$ conf" stellen. meuh vor 5 Jahren 0

0 Antworten auf die Frage