Jump to content

mod or something to open new window


  • Please log in to reply
14 replies to this topic

#1
Hacki-Hacki

Hacki-Hacki

    InsanelyMac Protégé

  • Members
  • PipPip
  • 60 posts
well hello there right now i m using Montain Lion DP1 and i wanted to know that is there any mod or something that can help me with opening the new window stuff well as your peoples already know that if we already opened a firefox window and if i click again firefox icon it brings me the same firefox window and to open a new window i have to use command & N or right click and select New Window to open new window ... well i wanted to know that is there any mod or something for like if i click on firefox /chrome/finder/ or anyother app that support multipule window to just click on the dock and instead opening the old one it bring me with the new window

Hope you understand my ques :)

Mods if its the wrong section please send it to the right one Thanks

#2
Hacki-Hacki

Hacki-Hacki

    InsanelyMac Protégé

  • Members
  • PipPip
  • 60 posts
???? no one knows :(

#3
Hacki-Hacki

Hacki-Hacki

    InsanelyMac Protégé

  • Members
  • PipPip
  • 60 posts
trying this for like when i was using 10.6.2 but didnt get usedto with it and in the end i have to switch to windows just to get some piece of mind :(

#4
eep357

eep357

    Triple Platinum

  • Supervisors
  • 2,527 posts
  • Gender:Male
  • Location:Dark Side of The Wall
  • Interests:things and stuff
if keyboards are a problem, you can right click on the dock icon and choose "new window"

#5
Hacki-Hacki

Hacki-Hacki

    InsanelyMac Protégé

  • Members
  • PipPip
  • 60 posts

if keyboards are a problem, you can right click on the dock icon and choose "new window"


mate i know everything for opening new windows / keyboard shortcuts /

i m just saying that i would be more easy to just click and open new window while having opened same app window and without using right click or using keyboard for new window

#6
eep357

eep357

    Triple Platinum

  • Supervisors
  • 2,527 posts
  • Gender:Male
  • Location:Dark Side of The Wall
  • Interests:things and stuff
remap keyboard shortcut to mouse button or maybe Secrets PrefPane has something to help. Because apps are minimized to dock, clicking dock icon to open new window would cause problems, but new window if desktop shortcut double clicked could have beneifit. I could probably put together something to achieve this, but it would be very system/desktop specific and likely not work if any changes were made to desktop layout.

#7
eep357

eep357

    Triple Platinum

  • Supervisors
  • 2,527 posts
  • Gender:Male
  • Location:Dark Side of The Wall
  • Interests:things and stuff
Here, I wasn't sure what browser you prefer, but can easily make more for any app that supports multiple inctances. This is just a simple shell script packaged in a app wrapper and safari icon, that will launch a brand new safari window every time it's clicked that will open to your home page, regardless of how many other windows are already running. replace the one in your dock with it and it will do exactly what you were asking for. Only requirement is that Safari be installed in it's default location at /Applications. Since it is only launching the version that is already there, it should not be impacted by software updates. I'll do google chrome in a minute. Let me know if there are any problems

Attached Files



#8
eep357

eep357

    Triple Platinum

  • Supervisors
  • 2,527 posts
  • Gender:Male
  • Location:Dark Side of The Wall
  • Interests:things and stuff
OK, complete rewrite using applescript so that multiple instances are not launched, only new windows and if app is not running it will launch it, if it is running then open a new window. Safari, Chrome, Firefox, your welcome.

Attached Files



#9
Hacki-Hacki

Hacki-Hacki

    InsanelyMac Protégé

  • Members
  • PipPip
  • 60 posts

OK, complete rewrite using applescript so that multiple instances are not launched, only new windows and if app is not running it will launch it, if it is running then open a new window. Safari, Chrome, Firefox, your welcome.


thanks mate i will try for sure and sorry for the late reply ... i will test and let you know and thanks again

#10
Hacki-Hacki

Hacki-Hacki

    InsanelyMac Protégé

  • Members
  • PipPip
  • 60 posts
mate i m getting error

Posted Image

#11
eep357

eep357

    Triple Platinum

  • Supervisors
  • 2,527 posts
  • Gender:Male
  • Location:Dark Side of The Wall
  • Interests:things and stuff
on which one? all?

I initially made and tested on macbook running 10.7.3, had to download chrome and firefox to try cause i don't use them, and worked fine. Just downloaded the files from here on ML Hack that only has safari on it. Safari worked fine, chrome gave a popup asking "what is Chrome?" and pulled up my applications folder for me to show it Chrome(I didn't) and the firefox one found some old version I had on another drive that hadn't been used in years and launched it as a first run. Since it's a launcher, app must already exist and not have been renamed. Oh and DONT UNZIP USING UNARCHIVER APP-CURRENT VERSION IN MAC APP STORE IS BROKEN. it will break any app you unzip with it

#12
eep357

eep357

    Triple Platinum

  • Supervisors
  • 2,527 posts
  • Gender:Male
  • Location:Dark Side of The Wall
  • Interests:things and stuff
Here, there was an error in firefox, an extra end statement. Also since straight apple script and not workflow, no point in having automator involved. This should work fine and is just a applescript.app

same changes applied to safari and chrome. Sorry about that, was hard for me to reproduce error but definately was one

Attached Files



#13
Hacki-Hacki

Hacki-Hacki

    InsanelyMac Protégé

  • Members
  • PipPip
  • 60 posts

Here, there was an error in firefox, an extra end statement. Also since straight apple script and not workflow, no point in having automator involved. This should work fine and is just a applescript.app

same changes applied to safari and chrome. Sorry about that, was hard for me to reproduce error but definately was one


mate many many thanks for helping me out i will test and report back

#14
kocoman

kocoman

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 315 posts
Is it possible to open a New Window of the "directory" of the "selected" window? thanks

#15
eep357

eep357

    Triple Platinum

  • Supervisors
  • 2,527 posts
  • Gender:Male
  • Location:Dark Side of The Wall
  • Interests:things and stuff
can you be a bit more specific? are you looking to do this in finder or universally with whatever program is active?

Here is my script for the safari launcher posted above, others are the same with only app name changed in the script, feel free to make changes to suit your needs. Paste it into AppleScript Editor in Applications/Utilities and compile incase any spacing errors from copy and pasting. "allow Assistive Devices" needs to be enabled under universal access in system preferences. Script assumes the name of the app's running process as seen in activity monitor has the name of the app in it i.e safari web content process. Basically it's just clicking on menu bar stuff for you, or if the app isn't running it will launch it instead. but will not take over your mouse or anything like that. If you want you could link together a series of them in automator to complete more complex tasks that would normally require clicking on 2 or more menu options and have them execute in a particular order. Example would be to launch mail app, select all mail items, then mark them all as read, run a shell script, then whatever and so on. Single script like above can be saved as an app in applescript editor using "save as" and chose app instead of script. Automator also has option to save as app or workflow. Automator app in my startup folder handles launching of all my start up apps, another workflow to prevent usb drives from sleeping/spindown and applies my wallpaper all with only having 1 app in startup folder instead of 10.

if appIsRunning("Safari") then --change this to app name of your choice
tell application "System Events"
  tell process "Safari" --change here too
   tell menu bar 1
    click menu item "New Window" of menu "File" --change file to any menu bar option and change new window to any sub option in the drop down
    delay 3
    keystroke return
   end tell
  end tell
end tell

else
tell application "Safari" to activate --and here
end if

-- functions
on appIsRunning(appName)
tell application "System Events" to (name of processes) contains appName
end appIsRunning






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

© 2014 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy