AutoHotkey Community

It is currently May 27th, 2012, 11:50 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 194 posts ]  Go to page Previous  1 ... 9, 10, 11, 12, 13
Author Message
 Post subject:
PostPosted: September 12th, 2011, 3:10 am 
Offline

Joined: July 30th, 2011, 11:55 pm
Posts: 12
nimda wrote:
Code:
COM_Invoke(psf, "Scale=", "exactfit")
Code:
psf.Scale := "exactfit"


thanks, but I get: unknown name, specifically "scale"

Think I'll have to wrap in html, similar to what you've done in aaron's youtube television


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 12th, 2011, 3:17 am 
Offline

Joined: July 30th, 2011, 11:55 pm
Posts: 12
You pointed me in the right direction - it was my bad using the guid.
And instead of navigate I should have used movie.

Code ends up like so:

Code:
#SingleInstance force

w = 530
h = 336

Gui, 1: +LastFound -Caption +AlwaysOnTop -SysMenu
Gui, 1: Show, w%w% h%h% Center, Flash
Gui, 1: Margin, 0 ,0
Gui, 1: Add, ActiveX, w%w% h%h% vpwb, ShockwaveFlash.ShockwaveFlash
getSwfFromDisk = %A_ScriptDir%/HyperFPLaunch/hiScores_0.swf
pwb.Movie := "file:///" . getSwfFromDisk
pwb.Scale := "exactfit"
Return

GuiClose:
  Esc::
  Gui, 1:Destroy
  ExitApp
Return


Cheers Nimda :)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 17th, 2011, 7:40 am 
Offline

Joined: September 28th, 2011, 7:17 am
Posts: 47
So, 2 questions:
1) If the embedded media player uses a function from a library that's part of AHK_L, why isn't it working?
2) How can I make the media player play more than 1 file at a time?

_________________
To-do list:
1) Add signature.
2) Stop procrastinating.


Last edited by ScripterZ on December 17th, 2011, 8:52 am, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 17th, 2011, 8:12 am 
Offline
User avatar

Joined: May 24th, 2009, 5:35 am
Posts: 2099
Location: Iowa, USA
what's it?

_________________
Image
Recommended: AutoHotkey_L
Basic Webpage Controls


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 17th, 2011, 10:24 pm 
Offline

Joined: September 28th, 2011, 7:17 am
Posts: 47
ScripterZ wrote:
So, 2 questions:
1) If the embedded media player uses a function from a library that's part of AHK_L, why isn't it working?
2) How can I make the media player play more than 1 file at a time?

jethrow wrote:
what's it?

:?:

_________________
To-do list:
1) Add signature.
2) Stop procrastinating.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 17th, 2011, 10:49 pm 
Offline

Joined: November 17th, 2011, 6:04 pm
Posts: 392
ScripterZ wrote:
ScripterZ wrote:
So, 2 questions:
1) If the embedded media player uses a function from a library that's part of AHK_L, why isn't it working?
2) How can I make the media player play more than 1 file at a time?

jethrow wrote:
what's it?

:?:

Could be the underlined part.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 18th, 2011, 12:01 am 
Offline

Joined: September 28th, 2011, 7:17 am
Posts: 47
aRt)Y wrote:
ScripterZ wrote:
ScripterZ wrote:
So, 2 questions:
1) If the embedded media player uses a function from a library that's part of AHK_L, why isn't it working?
2) How can I make the media player play more than 1 file at a time?

jethrow wrote:
what's it?

:?:

Could be the underlined part.

If the library is part of AHK now, shouldn't it work now? Or does it use a new command?

_________________
To-do list:
1) Add signature.
2) Stop procrastinating.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 18th, 2011, 5:00 am 
Offline
User avatar

Joined: May 24th, 2009, 5:35 am
Posts: 2099
Location: Iowa, USA
What library - and what's not working?

_________________
Image
Recommended: AutoHotkey_L
Basic Webpage Controls


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 18th, 2011, 9:14 am 
Offline

Joined: September 28th, 2011, 7:17 am
Posts: 47
Sorry, didn't realize it wasn't the first post.
Code:
FileSelectFile, file, 2, %A_MyDocuments%, Select WMP Compatable File:
if Errorlevel
   ExitApp

Gui, +LastFound +Resize
wmp := Atl_AxCreateControl(WinExist(), "WMPlayer.OCX") <- this
wmp.URL := file
Gui, Show, w300 h300 Center, Player GUI
return

GuiClose:
   Gui, Destroy
   ExitApp

Anyway, the line shown (bbcode doesn't work in code) part gives an error when using just AHK_L. However, when using the Atl.ahk library, it works fine. Does ahkL use another command for that?
Also, is there a way to make it play more than 1 file? (Just editing Fileselectfile to allow multiple files isn't enough apparently.)
I really like the media player, but it would be nice if I could play more than 1 file at a time.

_________________
To-do list:
1) Add signature.
2) Stop procrastinating.


Last edited by ScripterZ on December 18th, 2011, 11:50 am, edited 3 times in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 18th, 2011, 10:40 am 
Offline
User avatar

Joined: May 24th, 2009, 5:35 am
Posts: 2099
Location: Iowa, USA
Thanks for pointing it out - I updated the example.

ScripterZ wrote:
I really like your media player, but it would be nice if I could play more than 1 file at a time.
It's not my media player - it simply uses the WMP ActiveX control. Also, it wasn't designed to be an example of an all-out media player - it's just a simple demonstration of how to embed the ActiveX control in a GUI.

_________________
Image
Recommended: AutoHotkey_L
Basic Webpage Controls


Report this post
Top
 Profile  
Reply with quote  
PostPosted: January 17th, 2012, 11:50 pm 
So I have some code to create a connection to a SQL Server DB and import a table into excel. My AHK Script does this as follows once an excel file/workbook is open/active/visible...

Code:
; Create DB Connection
send {ALT}
sleep 100
send A
sleep 100
send F+O
sleep 100
send {ENTER}
sleep 100


The script then goes on to create the connection by moving through various prompts and sending the server info etc... I can post that code if needed.

I have been modifying this script after seeing these COM so that AHK will do these actions without the excel file being shown. From this thread and others I have started with the following...

Code:
; Com code to activate an excel object and workbook without displaying it
oExcel := ComObjCreate("Excel.Application") ; create Excel Application object
oExcel.Workbooks.Add   ; create a new workbook
oExcel.ActiveWorkbook.SaveAs(FileName) ; save the excel work book


I am stuck at the next spot which is creating the SQL Server connection using the COM commands for the excel workbook.

I suspect I need to use the following, but I'm not sure how to procede...

Code:
oExcel.ActiveWorkbook.SaveAsODC(ODBCFileName, "Connection Description, ODBCConnectionString, ?) ; save the ODBC connection as a Microsoft Office Data Connection file


Has anyone tried this? Can anyone point me in the correct direction?

Thanks all


Report this post
Top
  
Reply with quote  
PostPosted: February 20th, 2012, 1:16 pm 
Offline

Joined: February 20th, 2012, 1:07 pm
Posts: 5
Location: 01662
Hello!
Great Code to make access to word!
but...
but...

oWord.Selection.TypeText %Var%

it´s not working!

your example contains live-Strings, this IS working...
Do you please have ´n idea`!


(I dont want to use ...send...)
____________________________________________________________
oWord.Selection.TypeText("Visit ") ; type text

oWord.ActiveDocument.Hyperlinks.Add(oWord.Selection.Range, "http://www.autohotkey.com/forum/topic61509.html"
,"","","COM Object Reference [AutoHotkey_L]") ; insert hyperlink
oWord.Selection.TypeText("and learn how to work with ") ; type text

oWord.Selection.TypeText("COM objects") ; type text

oWord.Selection.TypeText(".") ; type text
oWord.Selection.TypeParagraph ; type paragraph (enter, new line)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 20th, 2012, 7:15 pm 
Offline

Joined: December 26th, 2010, 7:40 pm
Posts: 4172
Location: Awesometown, USA
Quote:
oWord.Selection.TypeText %Var%

you need to use an Expression.
Code:
oWord.Selection.TypeText(Var)

_________________
Autofire, AutoClick, Toggle, SpamWindow Control Tools
Recommended: AutoHotkey_L


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 8th, 2012, 10:49 pm 
Offline
User avatar

Joined: April 4th, 2009, 8:19 pm
Posts: 1143
Location: Croatia
Excel post updated with some additional info.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 194 posts ]  Go to page Previous  1 ... 9, 10, 11, 12, 13

All times are UTC [ DST ]


Who is online

Users browsing this forum: Google [Bot], Google Feedfetcher, rrhuffy, Yahoo [Bot] and 37 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group