当前位置:文档之家› Universities and Their Function

Universities and Their Function

Universities and Their Function
Universities and Their Function

Universities and Their Function*

by

Alfred North Whitehead

Address to the American Association of the Collegiate Schools of Business, 1927.

I

The expansion of universities is one marked feature of the social life in the present age. All countries have shared in this movement, but more especially America, which thereby occupies a position of honour. It is, however, possible to be overwhelmed even by the gifts of good fortune; and this growth of universities, in number of institutions, in size, and in internal complexity of organization, discloses some danger of destroying the very sources of their usefulness, in the absence of a widespread understanding of the primary functions which universities should perform in the service of a nation. These remarks, as to the necessity for reconsideration of the function of universities, apply to all the more developed countries. They are only more especially applicable to America, because this country has taken the lead in a development which, under wise guidance, may prove to be one of the most fortunate forward steps which civilisation has yet taken.

This article will only deal with the most general principles, though the special problems of the various departments in any university are, of course, innumerable. But generalities require illustration, and for this purpose I choose the business school of a university. This choice is dictated by the fact that business schools represent one of the newer developments of university activity. They are also more particularly relevant to the dominant social activities of modern nations, and for that reason are good examples of the way in which the national life should be affected by the activities of its universities. Also at Harvard, where I have the honour to hold office, the new foundation of a business school on a scale amounting to magnificence has just reached its completion.

There is a certain novelty in the provision of such a school of training, on this scale of magnitude, in one of the few leading universities of the world. It marks the culmination of a movement which for many years past has introduced analogous departments throughout American universities. This is a new fact in the university world; and it alone would justify some general reflections upon the purpose of a university education, and upon the proved importance of that purpose for the welfare of the social organism.

The novelty of business schools must not be exaggerated. At no time have universities been restricted to pure abstract learning. The University of Salerno in Italy, the earliest of European universities, was devoted to medicine. In England, at Cambridge, in the year 1316, a college was founded for the special purpose of providing `clerks for the King's service.' Universities have trained clergy, medical men, lawyers, engineers. Business is now a highly intellec-tualized vocation, so it well fits into the series. There is, however, this novelty: the curriculum suitable for a business school, and the various modes of activity of such a school, are still in the experimental stage. Hence the peculiar importance of recurrence to general principles in connection with the moulding of these schools. It would, however, be an act of presumption on my part if I were to enter upon any consideration of details, or even upon types of policy Space for Notes

affecting the balance of the whole training. Upon such questions I have no special knowledge, and therefore have no word of advice.

II

The universities are schools of education, and schools of research. But the primary reason for their existence is not to be found either in the mere knowledge conveyed to the students or in the mere opportunities for research afforded to the members of the faculty.

Both these functions could be performed at a cheaper rate, apart from these very expensive institutions. Books are cheap, and the system of apprenticeship is well understood. So far as the mere imparting of information is concerned, no university has had any justification for existence since the popularisation of printing in the fifteenth century. Yet the chief impetus to the foundation of universities came after that date, and in more recent times has even increased. The justification for a university is that it preserves the connection between knowledge and the zest of life, by uniting the young and the old in the imaginative consideration of learning. The university imparts information, but it imparts it imaginatively. At least, this is the function which it should perform for society. A university which fails in this respect has no reason for existence. This atmosphere of excitement, arising from imaginative consideration, transforms knowledge. A fact is no longer a bare fact: it is invested with all its possibilities. It is no longer a burden on the memory: it is energising as the poet of our dreams, and as the architect of our purposes.

Imagination is not to be divorced from the facts: it is a way of illuminating the facts. It works by eliciting the general principles which apply to the facts, as they exist, and then by an intellectual survey of alternative possibilities which are consistent with those principles. It enables men to construct an intellectual vision of a new world, and it preserves the zest of life by the suggestion of satisfying purposes.

Youth is imaginative, and if the imagination be strengthened by discipline this energy of imagination can in great measure be preserved through life. The tragedy of the world is that those who are imaginative have but slight experience, and those who are experienced have feeble imaginations. Fools act on imagination without knowledge; pedants act on knowledge without imagination. The task of a university is to weld together imagination and experience.

The initial discipline of imagination in its period of youthful vigour requires that there be no responsibility for immediate action. The habit of unbiased thought, whereby the ideal variety of exemplification is discerned in its derivation from general principles, cannot be acquired when there is the daily task of preserving a concrete organisation. You must be free to think rightly and wrongly, and free to appreciate the variousness of the universe undisturbed by its perils.

These reflections upon the general functions of a university can be at once translated in terms of the particular functions of a business school. We need not flinch from the assertion that the main function of such a school is to produce men with a greater zest for business. It is a libel upon human nature to conceive that zest for life is the product of pedestrian purposes directed toward the narrow routine of material comforts. Mankind by its pioneering instinct,

and in a hundred other ways, proclaims the falsehood of that lie.

In the modern complex social organism, the adventure of life cannot be disjoined from intellectual adventure. Amid simpler circumstances, the pioneer can follow the urge of his instinct, directed toward the scene of his vision from the mountain top. But in the complex organisations of modern business the intellectual adventure of analysis, and of imaginative reconstruction, must precede any successful reorganisation. In a simpler world, business relations were simpler, being based on the immediate contact of man with man and on immediate confrontation with all relevant material circumstances. Today business organisation requires an imaginative grasp of the psychologies of populations engaged in differing modes of occupation; of populations scattered through cities, through mountains, through plains; of populations on the ocean, and of populations in mines, and of populations in forests. It requires an imaginative grasp of conditions in the tropics, and of conditions in temperate zones. It requires an imaginative grasp of the interlocking interests of great organisations, and of the reactions of the whole complex to any change in one of its elements. It requires an imaginative understanding of laws of political economy, not merely in the abstract, but also with the power to construe them in terms of the particular circumstances of a concrete business. It requires some knowledge of the habits of government, and of the variations of those habits under diverse conditions. It requires an imaginative vision of the binding forces of any human organisation, a sympathetic vision of the limits of human nature and of the conditions which evoke loyalty of service. It requires some knowledge of the laws of health, and of the laws of fatigue, and of the conditions for sustained reliability. It requires an imaginative understanding of the social effects of the conditions of factories. It requires a sufficient conception of the role of applied science in modern society. It requires that discipline of character which can say `yes' and `no' to other men, not by reason of blind obstinacy, but with firmness derived from a conscious evaluation of relevant alternatives.

The universities have trained the intellectual pioneers of our civilisation - the priests, the lawyers, the statesmen, the doctors, the men of science, and the men of letters. They have been the home of those ideals which lead men to confront the confusion of their present times. The Pilgrim Fathers left England to found a state of society according to the ideals of their religious faith; and one of their earlier acts was the foundation of Harvard University in Cambridge, named after that ancient mother of ideals in England, to which so many of them owed their training. The conduct of business now requires intellectual imagination of the same type as that which in former times has mainly passed into those other occupations; and the universities are the organisations which have supplied this type of mentality for the service of the progress of the European races.

In early mediaeval history the origin of universities was obscure and almost unnoticed. They were a gradual and natural growth. But their existence is the reason for the sustained, rapid progressiveness of European life in so many fields of activity. By their agency the adventure of action met the adventure of thought. It would not have been possible antecedently to have divined that such organisations would have been successful. Even now, amid the imperfections of all things human, it is sometimes difficult to understand how they succeed in their work. Of course there is much failure in the work of universities. But, if we take a broad view of history, their success has been remarkable and almost uniform. The cultural histories of Italy, of France, of Germany, of Holland, of Scotland, of England, of the United States, bear witness to the influence of

universities. By `cultural history' I am not chiefly thinking of the lives of scholars; I mean the energising of the lives of those men who gave to France, to Germany, and to other countries that impress of types of human achievement which, by their addition to the zest of life, form the foundation of our patriotism. We love to be members of a society which can do those things. There is one great difficulty which hampers all the higher types of human endeavour. In modern times this difficulty has even increased in its possibilities for evil. In any large organisation the younger men, who are novices, must be set to jobs which consist in carrying out fixed duties in obedience to orders. No president of a large corporation meets his youngest employee at his office door with the offer of the most responsible job which the work of that corporation includes. The young men are set to work at a fixed routine, and only occasionally even see the president as he passes in and out of the building. Such work is a great discipline. It imparts knowledge, and it produces reliability of character; also it is the only work for which the young men, in that novice stage, are fit, and it is the work for which they are hired. There can be no criticism of the custom, but there may be an unfortunate effectprolonged routine work dulls the imagination.

The result is that qualities essential at a later stage of a career are apt to be stamped out in an earlier stage. This is only an instance of the more general fact, that necessary technical excellence can only be acquired by a training which is apt to damage those energies of mind which should direct the technical skill. This is the key fact in education, and the reason for most of its difficulties.

The way in which a university should function in the preparation for an intellectual career, such as modern business or one of the older professions, is by promoting the imaginative consideration of the various general principles underlying that career. Its students thus pass into their period of technical apprenticeship with their imaginations already practised in connecting details with general principles. The routine then receives its meaning, and also illuminates the principles which give it that meaning. Hence, instead of a drudgery issuing in a blind rule of thumb, the properly trained man has some hope of obtaining an imagination disciplined by detailed facts and by necessary habits.

Thus the proper function of a university is the imaginative acquisition of knowledge. Apart from this importance of the imagination, there is no reason why business men, and other professional men, should not pick up their facts bit by bit as they want them for particular occasions. A university is imaginative or it is nothing - at least nothing useful.

III

Imagination is a contagious disease. It cannot be measured by the yard, or weighed by the pound, and then delivered to the students by members of the faculty. It can only be communicated by a faculty whose members themselves wear their learning with imagination. In saying this, I am only repeating one of the oldest of observations. More than two thousand years ago the ancients symbolised learning by a torch passing from hand to hand down the generations. That lighted torch is the imagination of which I speak. The whole art in the organisation of a university is the provision of a faculty whose learning is lighted up with imagination. This is the problem of problems in university education; and unless we are careful the recent vast extension of universities in number of students and in variety of activities -of which we are

so justly proud - will fail in producing its proper results, by the mishandling of this problem.

The combination of imagination and learning normally requires some leisure, freedom from restraint, freedom from harassing worry, some variety of experiences, and the stimulation of other minds diverse in opinion and diverse in equipment. Also there is required the excitement of curiosity, and the self-confidence derived from pride in the achievements of the surrounding society in procuring the advance of knowledge. Imagination cannot be acquired once and for all, and then kept indefinitely in an ice box to be produced periodically in stated quantities. The learned and imaginative life is a way of living, and is not an article of commerce.

It is in respect to the provision and utilisation of these conditions for an efficient faculty that the two functions of education and research meet together in a university. Do you want your teachers to be imaginative? Then encourage them to research. Do you want your researchers to be imaginative? Then bring them into intellectual sympathy with the young at the most eager, imaginative period of life, when intellects are just entering upon their mature discipline. Make your researchers explain themselves to active minds, plastic and with the world before them; make your young students crown their period of intellectual acquisition by some contact with minds gifted with experience of intellectual adventure. Education is discipline for the adventure of life; research is intellectual adventure; and the universities should be homes of adventure shared in common by young and old. For successful education there must always be a certain freshness in the knowledge dealt with. It must either be new in itself or it must be invested with some novelty of application to the new world of new times. Knowledge does not keep any better than fish. You may be dealing with knowledge of the old species, with some old truth; but some-how or other it must come to the students, as it were, just drawn out of the sea and with the freshness of its immediate importance.

It is the function of the scholar to evoke into life wisdom and beauty which, apart from his magic, would remain lost in the past. A progressive society depends upon its inclusion of three groupsscholars, discoverers, inventors. Its progress also depends upon the fact that its educated masses are composed of members each with a tinge of scholarship, a tinge of discovery, and a tinge of invention. I am here using the term `discovery' to mean the progress of knowledge in respect to truths of some high generality, and the term `invention' to mean the progress of knowledge in respect to the application of general truths in particular ways subservient to present needs. It is evident that these three groups merge into each other, and also that men engaged in practical affairs are properly to be called inventors so far as they contribute to the progress of society. But any one individual has his own limitation of function, and his own peculiar needs. What is important for a nation is that there shall be a very close relation between all types of its progressive elements, so that the study may influence the market place, and the market place the study. Universities are the chief agencies for this fusion of progressive activities into an effective instrument of progress. Of course they are not the only agencies, but it is a fact that today the progressive nations are those in which universities flourish.

It must not be supposed that the output of a university in the form of original ideas is solely to be measured by printed papers and books labeled with the names of their authors. Mankind is as individual in its mode of output as in the substance of its thoughts. For some of the most fertile minds composition in

writing, or in a form reducible to writing, seems to be an impossibility. In every faculty you will find that some of the more brilliant teachers are not among those who publish. Their originality requires for its expression direct intercourse with their pupils in the form of lectures, or of personal discussion. Such men exercise an immense influence; and yet, after the generation of their pupils has passed away, they sleep among the innumerable unthanked benefactors of humanity. Fortunately, one of them is immortal - Socrates.

Thus it would be the greatest mistake to estimate the value of each member of a faculty by the printed work signed with his name. There is at the present day some tendency to fall into this error; and an emphatic protest is necessary against an attitude on the part of authorities which is damaging to efficiency and unjust to unselfish zeal.

But, when all such allowances have been made, one good test for the general efficiency of a faculty is that as a whole it shall be producing in published form its quota of contributions of thought. Such a quota is to be estimated in weight of thought, and not in number of words.

This survey shows that the management of a university faculty has no analogy to that of a business organisation. The public opinion of the faculty, and a common zeal for the purposes of the university, form the only effective safeguards for the high level of university work. The faculty should be a band of scholars, stimulating each other, and freely determining their various activities. You can secure certain formal requirements, that lectures are given at stated times and that instructors and students are in attendance. But the heart of the matter lies beyond all regulation.

The question of justice to the teachers has very little to do with the case. It is perfectly just to hire a man to perform any legal services under any legal conditions as to times and salary. No one need accept the post unless he so desires.

The sole question is, What sort of conditions will produce the type of faculty which will run a successful university? The danger is that it is quite easy to produce a faculty entirely unfit - a faculty of very efficient pedants and dullards. The general public will only detect the difference after the university has stunted the promise of youth for scores of years.

The modern university system in the great democratic countries will only be successful if the ultimate authorities exercise singular restraint, so as to remember that universities cannot be dealt with according to the rules and policies which apply to the familiar business corporations. Business schools are no exception to this law of university life. There is really nothing to add to what the presidents of many American universities have recently said in public on this topic. But whether the effective portion of the general public, in America or other countries, will follow their advice appears to be doubtful. The whole point of a university, on its educational side, is to bring the young under the intellectual influence of a band of imaginative scholars. There can be no escape from proper attention to the conditions which - as experience has shown - will produce such a band.

IV

The two premier universities of Europe, in age and in dignity, are the University of Paris and the University of Oxford. I will speak of my own

country because I know it best. The University of Oxford may have sinned in many ways. But, for all her deficiencies, she has throughout the ages preserved one supreme merit, beside which all failures in detail are as dust in the balance: for century after century, throughout the long course of her existence, she has produced bands of scholars who treated learning imaginatively. For that service alone, no one who loves culture can think of her without emotion.

But it is quite unnecessary for me to cross the ocean for my examples. The author. of the Declaration of Independence, Mr. Jefferson, has some claim to be the greatest American. The perfection of his various achievements certainly places him among the few great men of all ages. He founded a university, and devoted one side of his complex genius to placing that university amid every circumstance which could stimulate the imagination - beauty of buildings, of situation, and every other stimulation of equipment and organisation.

There are many other universities in America which can point my moral, but my final example shall be Harvard - the representative university of the Puritan movement. The New England Puritans of the seventeenth and eighteenth centuries were the most intensely imaginative people, restrained in their outward expression, and fearful of symbolism by physical beauty, but, as it were, racked with the intensity of spiritual truths intellectually imagined. The Puritan faculties of those centuries must have been imaginative indeed, and they produced great men whose names have gone round the world. In later times Puritanism softened, and, in the golden age of literary New England, Emerson, Lowell, and Longfellow set their mark upon Harvard. The modern scientific age then gradually supervenes, and again in William James we find the typical imaginative scholar.

Today business comes to Harvard; and the gift which the University has to offer is the old one of imagination, the lighted torch which passes from hand to hand. It is a dangerous gift, which has started many a conflagration. If we are timid as to that danger, the proper course is to shut down our universities. Imagination is a gift which has often been associated with great commercial peoples - with Greece, with Florence, with Venice, with the learning of Holland, and with the poetry of England. Commerce and imagination thrive together. It is a gift which all must pray for their country who desire for it that abiding greatness achieved by Athens: -

Her citizens, imperial spirits,

Rule the present from the past.

For American education no smaller ideal can suffice.

*Scanned from Alfred North Whitehead, The Aims of Education and Other Essays, New York: Free Press, 1967, pp. 91-101.

按键精灵插件使用说明

函数说明: 1.TransformWindow(窗口句柄) 功能:转换窗口,对要取后台图色数据的窗口使用该函数后才能取后台图色数据。如果是DX图形绘图的窗口,DX绘图区域必须有部分移到屏幕外,否则无法使用。转换窗口后,有些窗口(特别是大多数游戏的)要等待一会儿才能用其它函数可靠地取到后台图色数据,等待的时间要大于画面两次刷新的时间间隔。转换后到取消转换前,可以无限次使用取到后台图色数据的命令,即通常只需要转换一次。 参数: 1)窗口句柄:整型数。 2.UnTransformWindow(窗口句柄) 功能:取消窗口转换,DX图形绘图的窗口,用过TransformWindow后,必须用UnTransformWindow取消窗口转换才能让DX绘图完全移到屏幕中,否则后很严重(不会损坏电脑的),自己试下就知道了。 参数: 1)窗口句柄:整型数。 3.GetPixelColor(窗口句柄,横坐标,纵坐标)[颜色值] 功能:获得指定点的颜色 参数: 1)窗口句柄:整型数。 2)横坐标:整型数,窗口客户区坐标。 3)纵坐标:整型数,窗口客户区坐标。 返回值: 颜色值:整型数。 例子: Plugin hwnd=Window.Foreground() Plugin Window.Move(hwnd,-30,10) Plugin BGCP2_02.TransformWindow(hwnd) Delay 200 Plugin color=BGCP2_02.GetPixelColor(hwnd,0,0) MsgBox CStr(Hex(color)),4096,"颜色" Plugin BGCP2_02.UnTransformWindow(hwnd) Plugin Window.Move(hwnd,10,10) 4.CmpColor(窗口句柄,横坐标,纵坐标,颜色,颜色最大偏差)[是否满足条件] 功能:判断指定点的颜色,后台的IfColor 参数: 1)窗口句柄:整型数。 2)横坐标:整型数,窗口客户区坐标。 3)纵坐标:整型数,窗口客户区坐标。 4)颜色:整型数。 5)颜色最大偏差:整型数。游戏中不同电脑上显示的颜色会有点偏差,这个参数用于兼容这种情况,它设置的是RGB各颜色分量偏差的最大允许值,取值范围是0-255,0是无颜色偏差。 返回值: 是否满足条件:布尔值,布尔值是用来表达是真是假的,指定点的颜色满足条件就返回真,否则返回假。 例子: Import "BGCP2_02.dll" Plugin hwnd=Window.Foreground() Plugin Window.Move(hwnd,-30,10) Plugin BGCP2_02.TransformWindow(hwnd) Delay 200 Plugin tj=BGCP2_02.CmpColor(hwnd,6,5,&HFF7F00,30) If tj=true MsgBox "满足条件",4096 Else MsgBox "不满足条件",4096 EndIf Plugin BGCP2_02.UnTransformWindow(hwnd) Plugin Window.Move(hwnd,10,10) 5.FindColor(窗口句柄,左边界,上边界,右边界,下边界,颜色,颜色最大偏差,查找方式,横坐标,纵坐标) 功能:找色 参数: 1)窗口句柄:整型数。 2)左边界,整型数,用于设置找色范围,找色区域左上角的横坐标(窗口客户区坐标)。 3)上边界,整型数,用于设置找色范围,找色区域左上角的纵坐标(窗口客户区坐标)。 4)右边界,整型数,用于设置找色范围,找色区域右下角的横坐标(窗口客户区坐标)。 5)下边界,整型数,用于设置找色范围,找色区域右下角的纵坐标(窗口客户区坐标)。

通信系统建模与仿真课程设计

通信系统建模与仿真课程设计2011 级通信工程专业1113071 班级 题目基于SIMULINK的基带传输系统的仿真姓名学号 指导教师胡娟 2014年6月27日

1任务书 试建立一个基带传输模型,采用曼彻斯特码作为基带信号,发送滤波器为平方根升余弦滤波器,滚降系数为0.5,信道为加性高斯信道,接收滤波器与发送滤波器相匹配。发送数据率为1000bps,要求观察接收信号眼图,并设计接收机采样判决部分,对比发送数据与恢复数据波形,并统计误码率。另外,对发送信号和接收信号的功率谱进行估计。假设接收定时恢复是理想的。 2基带系统的理论分析 1.基带系统传输模型和工作原理 数字基带传输系统的基本组成框图如图1 所示,它通常由脉冲形成器、发送滤波器、信道、接收滤波器、抽样判决器与码元再生器组成。系统工作过程及各部分作用如下。 g T(t) n 定时信号 图 1 :数字基带传输系统方框图 发送滤波器进一步将输入的矩形脉冲序列变换成适合信道传输的波形g T(t)。这是因为矩形波含有丰富的高频成分,若直接送入信道传输,容易产生失真。 基带传输系统的信道通常采用电缆、架空明线等。信道既传送信号,同时又因存在噪声n(t)和频率特性不理想而对数字信号造成损害,使得接收端得到的波形g R(t)与发送的波形g T(t)具有较大差异。 接收滤波器是收端为了减小信道特性不理想和噪声对信号传输的影响而设置的。其主要作用是滤除带外噪声并对已接收的波形均衡,以便抽样判决器正确判决。 抽样判决器首先对接收滤波器输出的信号y(t)在规定的时刻(由定时脉冲cp控制)进行抽样,获得抽样信号{r n},然后对抽样值进行判决,以确定各码元是“1”码还是“0”码。 2.基带系统设计中的码间干扰和噪声干扰以及解决方案

学习游戏脚本制作:按键精灵里的if语句教程

学习游戏脚本制作:按键精灵里的if语句教程 来源:按键学院【按键精灵】万万没有想到……有一天居然会栽在if语句手里。 First—小编的凄惨经历 小编今早写脚本,由于无意间将if语句中的end if错删了,弹出了这样的错误提示: “(错误码0)没有找到合法的符号。” 看到这个提示,小编以为是哪个逗号不小心写成中文逗号,没成想丢了个end if也是出现这样的提示。 好在代码不多,所以错误点容易找到,那……如果,代码多达几百上千条的时候呢?眼泪马上掉出来~ 今天在这里和童鞋们一起来了解下,按键里的夫妻组合,看看这些夫妻被分开之后都会出现什么样的可怕情况: Second—一夫一妻制 If……end if判断语句 If判断语句,有分为两种: 1、 if语句条(条模式) 当判断完之后,要执行的语句只有一条的时候,使用if语句条

例如: If 1 > 0 Then MessageBox"Hello~" // If语句条,不需要添加end if //条模式的时候,if语句还是单身,不是夫妻组合 2、 if语句块(块模式) 当判断完之后,要执行的语句有很多条的时候,使用if语句块 例如: If 1 > 0Then MessageBox"Hello~" MessageBox"Hello~" End If //块模式的时候,if语句是已婚状态,夫妻组合。如果这个时候缺少了end if 就会出现下面的错误提示: 拓展:if语句块中then 可以省略 例如: If 1 >0 MessageBox"Hello~" MessageBox"Hello~"

End If For……next循环语句 例子: For i=1 To 10 //这里的脚本可以循环10次 Next 拓展:如果,循环体里不需要用到循环次数值,例如,需要打开十个记事本,可以这样写: For 10 RunApp "Notepad.exe" Next 当for循环语句缺少next的时候,会出现下面的错误提示: Do……Loop 循环语句 Do……Loop循环语句分为两种情况: 1、前判断 Do While条件 Loop

C#中如何调用按键精灵插件

C#中如何调用按键精灵插件 原来是为了在游戏外挂中发送键盘鼠标消息,自己写个sendmessage或者是postmessage又比较麻烦。于是google了一下,发现现在很多脚本工具都有这个功能,其中按键精灵的一个叫361度的插件已经有这个的实现,还验证过了。为什么不拿来己用呢?首先分析一下按键精灵插件的接口,发现: 插件的功能函数没有直接暴露出来,而是通过一个GetCommand的函数返回一个函数描述结构。 接下来看看这个结构: 上面这个结构我已经是转换成C#的对应结构了,原结构可以查看按键精灵提供的插件C++接口源代码。 这个结构里面的handlerFunction 实际上是指向函数的入口点,也就是一个函数指针,每个函数都一样是2个参数: typedef int (*QMPLUGIN_HANDLER)(char *lpszParamList, char *lpszRetVal); 转换为C#中相应的委托为: delegate void Invoker(string parameters, StringBuilder returnValue); 大家注意到,有两个参数,c++原型中都是char*类型,转换为C#的delegate后第一个为string,第二个为StringBuilder。这是因为parameters是in的,dll中不会对这个参数做修改,而returnValue是out的,dll返回时候要把返回值写入这个StringBuilder的缓冲区。 原本的想法是用C++写一个桥来调用dll,不过在.net 2.0 中,框架直接提供了

Marshal.GetDelegateForFunctionPointer 来转换一个函数指针为一个委托,这就方便多拉。请看下面代码,注意看BGKM_ExecuteCommand 这个函数里面的东西。 using System; using System.Collections.Generic; using System.Text; using System.Runtime.InteropServices; namespace WJsHome.Game.Utility { public class QMacro { [DllImport("BGKM5.dll", EntryPoint = "GetCommand")] static extern IntPtr BGKM_GetCommand(int commandNum); [StructLayout(LayoutKind.Sequential)] class QMPLUGIN_CMD_INFO { public string commandName; public string commandDescription; public IntPtr handlerFunction; public uint paramNumber; } delegate void Invoker(string parameters, StringBuilder returnValue); static string BuildParameters(params object[] parameters) { StringBuilder sb = new StringBuilder(); for (int i = 0; i < parameters.Length; i++) { sb.Append(parameters[i].ToString());

按键精灵脚本制作教程: HSV搞定偏色!

按键精灵脚本制作教程:HSV搞定偏色! 来源:按键学院【按键精灵】 院刊《如何识别渐变色或半透明的文字》中, 我们分享了如何通过设置偏色来查找渐变文字, 我们使用的是RGB方式,然后配合偏色计算器来计算出偏色的。 今天我们换个方式,不使用偏色计算器,依靠肉眼对颜色的感觉,看看能不能搞定偏色~ HSV颜色模型 了解HSV颜色模型前,我们先来看看RGB颜色模型 RGB颜色空间采用物理三基色表示:红、绿、蓝 任何一个颜色都是有三基色混合而成的。但是,人的视觉不适应这种颜色体制, 人的肉眼看颜色,不可能像机器一样,分析出颜色里含有多少比重的红、绿、蓝 肉眼看颜色,是通过由色相(Hue,简H),饱和度(Saturation,简S)和色明度(Value,简V)来识别我们看到的是什么颜色。

HSV就是用色相,饱和度和色明度来形容颜色,所以它适合人的视觉。 这个色彩缤纷的圆锥形就是HSV的色彩空间。 我们举个例子好好的理解下它。 例如,我们要找的颜色是,下图中红色点的颜色: 怎样才能描述这个颜色在圆锥里的位置呢? 首先要看圆锥的平面圆,这是一个被颜色块分割了的圆。(这个圆表示的是色相 H)图中为了便于查看,只分了几个大块,实际上,圆的360度每一度都表示着一种颜色。

我们看到了,我们要找的颜色它是在紫色的那一块。 接着我们看圆锥被切开的那个口子, 横向数进去,我们看到,红色点的颜色位于紫色块的第五个位置, 而且,我们发现,越靠近圆锥心,颜色就越淡,好像被掺和了水一样变得不纯洁了。这就是颜色的纯度,即饱和度S 。 最后,我们看圆锥被切开的口子,往圆锥底部而下的变化。 越往下颜色就越暗淡。 这就是颜色的亮度即色明度V 我们发现我们要找的点是在最亮的地方。 三步骤我们就确定了颜色的所在位置。 那么,真正应用到偏色里要怎么应用呢? 我们找个实例操作下~ 偏色处理

系统建模与仿真

一、基本概念 1、数字正弦载波调制 在通信中不少信道不能直接传送基带信号,必须用基带信号对载波波形的某些参量进行控制,使得载波的这些参量随基带信号的变化而变化,即所谓数字正弦载波调制。 2、数字正弦载波调制的分类。 在二进制时, 数字正弦载波调制可以分为振幅键控(ASK)、移频键控(FSK)和移相键控(PSK)三种基本信号形式。如黑板所示。 2、高斯白噪声信道 二、实验原理 1、实验系统组成 2、实验系统结构框图

图 1 2FSK信号在高斯白噪声信道中传输模拟框图 各个模块介绍p12 3、仿真程序 x=0:15;% x表示信噪比 y=x;% y表示信号的误比特率,它的长度与x相同FrequencySeparation=24000;% BFSK调制的频率间隔等于24KHz BitRate=10000;% 信源产生信号的bit率等于10kbit/s SimulationTime=10;% 仿真时间设置为10秒SamplesPerSymbol=2;% BFSK调制信号每个符号的抽样数等于2 for i=1:length(x)% 循环执行仿真程序 SNR=x(i);% 信道的信噪比依次取中的元素 sim('project_1');% 运行仿真程序得到的误比特率保存在工作区变量BitErrorRate中 y(i)=mean(BitErrorRate); end hold off% 准备一个空白的图 semilogy(x,y);%绘制的关系曲线图,纵坐标采用对数坐标 三、实验结论

图 4 2FSK信号误比特率与信噪比的关系曲线图 系统建模与仿真(二) ——BFSK在多径瑞利衰落信道中的传输性能 一、基本概念 多径瑞利衰落信道 二、实验原理 1、实验系统组成

(完整版)按键精灵默认插件命令大全

目录 插件命令面板 - BKgnd后台控制 (6) KeyPress 按键 (6) KeyDown 按下 (7) KeyUp 弹起 (8) LeftClick 左键单击 (9) LeftDoubleClick 左键双击 (10) LeftDown 左键按下 (11) LeftUp 左键弹起 (12) RightClick 右键单击 (13) RightDown 右键按下 (14) RightUp 右键弹起 (15) MiddleClick 中键单击 (16) SendString 发送字符串 (17) MoveTo 鼠标移动 (18) GetPixelColor 得到指定点颜色 (19) FindColor 区域找色 (20) FindColorEx 模糊找色 (21) FindCenterColor 中心找色 (22) 插件命令面板 - Color颜色 (23) ColorToRGB 颜色转RGB (23) GetRGB 得到RGB分量合并值 (23) ColorToHSL 颜色转HSL (24) CountColor 区域搜索颜色数量 (25) FindMutiColor 区域多点找色 (26) FindShape 区域多点找形状 (27) 插件命令面板 - Console控制台 (27) Open 打开 (28) Close 关闭 (29) ReadLine 读取一行 (29) WriteLine 写入一行 (29)

WaitKey 等待按键 (30) 插件命令面板 - Encrypt加解密 (30) Md5String 字符串MD5加密 (30) Md5File 文件MD5加密 (31) 插件命令面板 - File文件 (31) CloseFile 关闭文件 (31) CopyFile 复制文件 (31) CreateFolder 创建文件夹 (32) DeleteFile 删除文件 (32) DeleteFolder 删除文件夹 (33) ExistFile 判断文件(旧) (33) GetFileLength 得到文件长度 (33) IsFileExit 判断文件 (34) MoveFile 移动文件 (35) OpenFile 打开文件 (35) ReadFile 读取文件 (36) ReadFileEx 读取文件 (36) ReadINI 读取键值 (37) ReadLine 读取一行 (37) ReNameFile 重命名文件 (38) SeekFile 设置文件的当前读写位置 (38) SelectDirectory 弹出选择文件夹对话框 (39) SelectFile 弹出选择文件对话框 (39) SetAttrib 设置文件属性 (40) SetDate 设置文件日期时间 (41) WriteFile 写入文件 (41) WriteFileEx 写入文件 (41) WriteINI 写入键值 (42) WriteLine 写入一行 (42) 插件命令面板 - Media多媒体 (43) Beep 蜂鸣器 (43) Play 播放 (44)

按键精灵插件帮助

1.什么是按键精灵的插件 按键精灵的插件是由按键精灵官方或用户自己提供的一种功能扩展。由于按键精灵本身只提供脚本制作过程中最常用的功能,而不可能面面俱到。所以,如果您稍懂一点Visual C++编写程序的知识,就可以通过自己写按键精灵插件,实现比较特殊、高级的功能,如文件读写、注册表访问,等等。如果您愿意,还可以把自己写的插件提交给我们,我们可以在按键精灵的最新版中捆绑您编写的插件,和大家共同分享您的智慧! 按键精灵的插件是通过动态链接库(DLL)的形式提供的。这些动态链接库必须满足一定的规范,并且放在按键精灵所在路径的plugin文件夹下。在按键精灵启动的时候,会自动加载plugin文件夹下的每个插件。每个插件可以包含多个“命令”,每个命令则可以看作是一个独立的函数或者子程序。比如我们提供的文件相关操作插件File.dll,就提供了ExistFile(判断文件是否存在)、CopyFile(复制一个文件)、DeleteFile(删除一个文件)等多个命令。 目前按键精灵的插件只能使用Visual C++编写。您不需要懂得很高深的Visual C++编程技巧,也不需要知道插件的技术细节。因为我们已经提供了一个“模板”插件,您只需要在这个模板上按照下文所述的步骤进行一点点修改,一个属于您自己的插件就完成了。我们推荐您使用Visual C++ 6.0,也可以用Visual C++.NET。 值得说明的是,由于技术原因,按键精灵的插件目前还不能用Visual Basic、Delphi、JBuilder等常见的开发工具编写。但是有聪明的用户使用VBScript脚本和ActiveX DLL的形式,同样实现了按键精灵的功能扩展,典型的例子如Ringfo大虾制作的QMBoost等等。严格说来,这种功能扩展不能称为按键精灵的插件,但是我们同样欢迎这种类型的功能扩展。 2. 如何制作一个插件 2.1.准备动手 为按键精灵写一个插件其实非常简单,只需要您有一点Visual C++编程的知识就够了。如果您懂Visual C++编程,就请跟我一步一步的来完成一个简单的插件。 首先得计划一下,我们的插件完成什么功能,再考虑一下这个插件都需要具有哪些命令。这里假设我们的插件是用于字符串操作的,名字就叫String.dll,这个插件目前暂时只有一个命令,名字叫StrLen,是用于得到字符串长度的。也就是说,用户通过使用我们提供的StrLen 命令,传入一个字符串,我们给他返回这个字符串的长度。 具体的说,用户可能将来会在按键精灵中这样调用我们的插件命令: Dim length as integer Plugin length=String.StrLen(“Hello, world”) 如果您熟悉按键精灵,那么对第一句话不会陌生,它的意思是定义一个叫length的整数变量。第二句的意思,我们来解析一下:

系统建模与仿真项目驱动设计报告

系统建模与仿真项目驱动设计报告 学院:电气工程与自动化学院 专业班级:自动化143班 学号:2420142928 学生姓名:李荣 指导老师:杨国亮 时间:2016年6月10号

仿真技术是一门利用物理模型或数学模型模拟实际环境进行科学实验的技术,具有经济、可靠、实用、安全、灵活和可多次重复使用的优点。 本文中将使用Matlab软件实现一个简单的控制系统仿真演示,可实现对一些连续系统的数字仿真、连续系统按环节离散化的数字仿真、采样控制系统的数字仿真以及系统的根轨迹、伯德图、尼克尔斯图和奈氏图绘制。 本设计完成基本功能的实现,基于Matlab的虚拟实验仿真的建立和应用,培养了我们的兴趣,提高了我们的实践能力。 关键字:Matlab;系统数字仿真;根轨迹;伯德图。

第一章概述 (4) 1.1 设计目的 (4) 1.2 设计要求 (4) 1.3设计内容 (4) 第二章 Matlab简介 (6) 2.1 Matlab的功能特点 (6) 2.2 Matlab的基本操作 (6) 第三章控制系统仿真设计 (8) 3.1 控制系统的界面设计 (8) 3.2 控制系统的输入模型设计 (9) 3.3 欧拉法的Matlab实现 (12) 3.4 梯形法的Matlab实现 (14) 3.5 龙格-库塔法的Matlab实现 (15) 3.6 双线性变换法的Matlab实现 (16) 3.7 零阶保持器法的Matlab实现 (17) 3.8 一阶保持器法的Matlab实现 (18) 3.9 系统PID控制的Matlab实现 (19) 3.10 系统根轨迹的绘制 (21) 3.11系统伯德图的绘制 (22) 3.12系统尼克尔斯图的绘制 (23)

按键精灵教程

变量!神奇的小柜子 变量就是会变化的量。就像一个小柜子,我们可以在柜子里装载不同的东西,而当我们需要找到这些东西的时候,只要记住柜子的名字就可以了。 使用变量的方法是:先定义(给柜子起名)、再赋值(将物品放进柜子)、最后使用(根据柜子名字找到放在其中的物品)。 使用Dim命令定义变量,例如: Dim str1 //定义变量str1 Dim var1=22 //定义变量Var1,并且赋值为22 例子1:使用变量设置输出文字的内容 1、下面红色的是3行脚本,请把他复制到“源文件”当中 Dim str1 str1 = "你很聪明" SayString str1 2、Dim str1 就是定义变量,也就是说我们创建了一个小柜子,给他起名为str1 3、str1 = "你很聪明" 就是赋值,我们把"你很聪明"这几个字放到str1这个小柜子里 4、SayString str1 表示我们输出str1这个变量的内容,也就是说把str1这个小柜子里的内容拿出来交给SayString 这个命令去使用。 5、如果你希望修改喊话的内容,只要修改str1这个小柜子里的内容就可以了。 例子2:变量的一些用法 a=1 把数字1放进柜子a中。 b="你猜对了吗?" 把字符串你猜对了吗?放进柜子b中。字符串必须用""包含。 dc=3.14159265 把小数放进柜子dc中。 num1=1 num1=33 num2=55 sum=num1+num2 首先把33和55分别放入num1和num2中。然后把他们取出来,做加法操作(加法是由CPU来处理的),把结果放在sum中。结果sum等于88 num1=1 num1=33 num1被给值为1,然后又给值为33。此时,num1中存储是的33。1就被覆盖掉了。没有了:) sum=sum+1 这句不等同于数学的加法,也是初学者不容易理解的地方。我们只要想,把sum拿出来和1做加法,再放回sum中就可以了。sum原来的值是88,做完加法后,sum等于89。 pig=1 pig=pig*3+pig 能猜出pig最后等于几么?1*3+1。结果是4 例子3:使用变量输入1到100的数字 VBSCall RunApp("notepad") Delay 2000 a=1

学会用按键精灵制作游戏脚本之前后台坐标关联教程

学会用按键精灵制作游戏脚本之前后台坐标关联教程 来源:按键学院【按键精灵】 各位大大在切换前后台命令的时候,有没有遇到坐标切换呢~ 有没有发现前后台的命令,对同一个窗体内容,居然坐标不同!! 今天~院刊就跟大家普及下前台坐标与相对应的后台坐标知识~ 什么是前台坐标和后台坐标呢? 什么是前台坐标? 以屏幕左上角的坐标为起点(0,0,从而获取到的各个窗体的坐标,就是前台坐标。 什么是后台坐标? 以窗口左上角为起点(0,0,从而获取到的这个窗体内的相对坐标,就是后台坐标。 如图: 我们来举个栗子吧,例如txt文本里的输入文字的起始点。

至此,各位大大知道前后台坐标的联系了吧。一个是绝对坐标(前台),一个是相对坐标(后台)。 那么如何进行前后台坐标的切换呢 从上图里,聪明机智的小伙伴们就会发现:如果知道了前台坐标,也知道了窗口左上角的值。那么窗口客户区内的 任意后台的坐标,不是都可以通过以下计算来获得了: 后台x坐标=客户区前台x坐标-客户区左上角前台x坐标 后台y坐标=客户区前台y坐标-客户区左上角前台y坐标 如何获得客户区前台的x,y坐标呢? 我们使用按键精灵自带的窗体插件命令:GetWindowRect来获取。 命令名称: GetWindowRect 窗口边框大小 命令功能:得到窗口句柄的边框大小(包括标题栏 命令参数:参数1 整数型,窗口句柄

返回值:字符串型,边框大小(包括标题栏 注:返回为:边框窗口左角X坐标|边框窗口左上角Y坐标|边框窗口右下角X坐标 |边框窗口右下角Y坐标 //下面这句是得到窗口句柄的边框大小(包括标题栏 sRect = Plugin.Window.GetWindowRect(句柄 将你所要获取的窗口句柄填入括号内就可以啦~ 范例举例: 举个萌萌哒的例子:向记事本特定位置输入文字。 例如我要往“hello”和“按键精灵”中间插入文字: 2014-9-17 18:03 上传 下载附件(8 KB 思路: 每次打开记事本的位置,有可能会有变化。而我们又不能每次都要去获取它的坐标再改脚本,这样太费力了。所以呢,只要锁定了记事本,知道了目标在记事本中的相对位置就可以操作啦。 同理,寻找游戏里的物品目标,前台不稳定。后台命令也是基于相对坐标的。 1. 先找到目标窗体的左上角坐标 (通过窗体插件命令:GetWindowRect来获取) 2. 再找到目标窗体内,“hello”和“按键精灵”中间的坐标 (为了方便,我们用抓抓获取。在游戏中,可以通过找图找色来获取前台坐标)

电力系统建模及仿真课程设计

某某大学 《电力系统建模及仿真课程设计》总结报告 题目:基于MATLAB的电力系统短路故障仿真于分析 姓名 学号 院系 班级 指导教师

摘要:本次课程设计是结合《电力系统分析》的理论教学进行的一个实践课程。 电力系统短路故障,故障电流中必定有零序分量存在,零序分量可以用来判断故障的类型,故障的地点等,零序分量作为电力系统继电保护的一个重要分析量。运用Matlab电力系统仿真程序SimPowerSystems工具箱构建设计要求所给的电力系统模型,并在此基础上对电力系统多中故障进行仿真,仿真波形与理论分析结果相符,说明用Matlab对电力系统故障分析的有效性。实际中无法对故障进行实验,所以进行仿真实验可达到效果。 关键词:电力系统;仿真;短路故障;Matlab;SimPowerSystems Abstract: The course design is a combination of power system analysis of the theoretical teaching, practical courses. Power system short-circuit fault, the fault current must be zero sequence component exists, and zero-sequence component can be used to determine the fault type, fault location, the zero-sequence component as a critical analysis of power system protection. SimPowerSystems Toolbox building design requirements to the power system model using Matlab power system simulation program, and on this basis, the power system fault simulation, the simulation waveforms with the theoretical analysis results match, indicating that the power system fault analysis using Matlab effectiveness. Practice can not fault the experiment, the simulation can achieve the desired effect. Keywords: power system; simulation; failure; Matlab; SimPowerSystems - 1 - 目录 一、引言 ............................................ - 3 -

《生产物流系统建模和仿真》课程设计报告

《生产物流系统建模与仿真》课程设计 2012-2013学年度第一学期 姓名孙会芳 学号 099094090 班级工093 指导老师暴伟霍颖

目录 一、课程任务书 (3) 1.题 目............................................................... (3) 2.课程设计内容 (3) 3.课程设计要求 (4) 4.进度安排 (4) 5.参考文献 (4) 二、课程设计正文 (5) 1、题目 (5) 2、仿真模型建立 (5) (1)实体元素定义 (5) (2)元素可视化的设置 (6) (3)元素细节设计 (8) (4 ) 模型运行和数据.................................................................. . (10) (5)模型代码 (12) (6)模型改进 (16) 3.实验感想 (17)

三、参考文献 (18) 《生产物流系统建模与仿真》课程设计任务书 1. 题目 离散型流水作业线系统仿真 2. 课程设计内容 系统描述与系统参数: (1)一个流水加工生产线,不考虑其流程间的空间运输。 (2)两种工件A,B分别以正态分布和均匀分布的时间间隔进入系统,A进入队列Q1, B进入队列Q2,等待检验。(学号最后位数对应的仿真参数设置按照下表进行) (3)操作工人labor1对A进行检验,每件检验用时2分钟,操作工人labor2对B进行检验,每件检验用时2分钟。 (4)不合格的工件废弃,离开系统;合格的工件送往后续加工工序,A的合格率为65%,B的合格率为95%。 (5)工件A送往机器M1加工,如需等待,则在Q3队列中等待;B送往机器M2加工,如需等待,则在Q4队列中等待。 (6)A在机器M1上的加工时间为正态分布(5,1)分钟;B在机器M2上的加工时间为正态分布(8,1)分钟。

学会用按键精灵制作用脚本运行可执行程序

学会用按键精灵制作脚本之RunApp 运行命令教程: 用脚本运行可执行程序 来源:按键学院【按键精灵】Runapp命令,看上去是不是觉得so easy ?不就是runapp 某个程序的路径,然后就可以打开这个程序了吗?老话怎么说来着,越简单的东西越是不简单。Runapp使用起来也是处处暗藏杀机滴。 Runapp命令是个啥? 命令名称RunApp 运行 命令功能启动一个程序或者打开一个文件 命令参数参数1 字符串型,要运行的程序或者文件 重头杀机——你所要启动的程序是带参数的,runapp 不支持启动带参数的程序。 首先,我们可以使用进程查看工具,查看下我们要启动的程序是否是带有参数的。

然后,我们打开进程查看工具,然后点击我们要查看的程序,例如QQ程序。 图1的是QQ的快捷键方式属性;图2是进程工具查看到的QQ程序信息;图3是进程工具界面如果是带有参数的程序,用进程工具打开之后,弹出的图2界面,在程序路径后面会出现参数。 例如:F:\桌面\程序目录\Not.exe $-fl$ 解决方法之一: 1. 鼠标右键,创建快捷方式 1)右击创建好的快捷方式——>属性: 2)“目标内容”填写目标文件路径及参数: 3)F:\桌面\程序目录\Not.exe $-fl$

4)“起始位置”填写目标文件夹: 5)F:\桌面\程序目录 (用进程查看工具查看,有的情况下会发现,程序所在的位置并不是程序的目录,这里要注意确认,一定要填写程序的其实位置,程序所在的目标文件夹的位置) 如图所示: 2. 使用RunApp启动这个快捷方式,例如在此快捷方式在桌面时。 Call RunApp("C:\Users\Death\Desktop\Not.exe.lnk") 经过上面的两步就可以达到预想的目的了。 解决方法之二:

系统建模与仿真设计报告一

设计一产生十种不同分布的独立的随机数 一、设计内容及要求 任务:产生十种不同分布的独立的随机数,并进行检验。 要求:对随机数进行的统计性检验包括频率检验、参数检验、独立性检验。 二、设计环境及工具 Windows7、MatlabR2010b 三、设计思想及方法 (1) 在对雷达系统进行仿真时,首当其冲的问题就是对电磁环境 的仿、真。其中无用的电磁信号包括三大类,即杂波、噪声和干扰,在模拟仿真时相比于有用的电磁信号也是不可或缺的。其所谓的仿真就是在已知随机变量的统计特性及其参数的情况下,研究如何在计算机上产生服从给定统计特性和参数的随机变量。 (2) 在雷达、导航、声呐、通信和电子对抗等系统中,应用最多 的概率统计模型还是正态分布或高斯分布、指数分布、瑞利分布、莱斯分布或广义瑞利分布、韦尔分布、对数-正态分布、m分布、拉普拉斯分布、复合k分布等。 (3) 在这些随机总体中畸形随机抽样,实际上都是以[0,1]区间上 的均匀分布随机总体为基础的。原则上讲,只要已知[0,1]区间上的均匀分布随机数序列,总可以通过某种方法(数学方法)来获得某已知分布的简单子样。只要给定的均匀分布随机数列满足均匀

且相互独立打的要求,经过严格的数学变换或者严格的数学方法,所产生的任何分布的简单子样都会满足具有相同总体分布和相互独立的要求。 四、设计过程及结果 本次设计的十种随机数包括均匀分布、高斯分布、指数分布、广 义指数分布、瑞利分布、广义瑞利分布、韦尔分布、拉普拉斯分布、柯西分布和2χ分布,使用Matlab 完成设计并给出具体的参数,代码附在最后。 1.均匀分布 已知随机变量ε在[0,1]区间上服从均匀分布,则有概率密度函数 1,01 ()0,x f x ≤≤?=?? 其他 其分布函数为 0,0F(),01 x x x x x

按键精灵图文教程

手把手教你用“按键精灵”图文教程 类型:转载 按键精灵是一个可以模拟电脑操作的软件,您在电脑上的一切动作都可以让按键精灵模拟执行,完全解放您的双手。按键精灵可以帮你操作电脑,不需要任何编程知识就可以作出功能强大的脚本。 如果你还为一些枯燥、繁琐的电脑操作而烦恼,按键精灵绝对会是你最好的帮手。 那么,按键精灵具体能帮我们干什么呢?我们来列举几个例子来说明下。 * 网络游戏中可作脚本实现自动打怪,自动补血,自动说话等; * 办公族可用它自动处理表格、文档,自动收发邮件等; * 任何你觉得“有点烦”的电脑操作都可以替你完成。按键精灵第一个实现了“动动鼠标就可以制作出脚本”的功能。我们不希望为了使用一个小软件而去学习编程知识,考虑到这些,所以按键精灵完全界面操作就可以制作脚本。按键精灵的脚本是纯粹的TXT文件,即使是目前新增了插件功能,也引入了数字签名的机制。因此我们可以放心的使用网站上的脚本而不用担心会有病毒。 脚本就是一系列可以反复执行的命令.通过一些判断条件,可以让这些命令具有一定的智能效果.我们可以通过”录制”功能制作简单的脚本,还可通过”脚本编辑器”制作更加智能的脚本.今天我们就通过录制一个最简单的脚本,来手把手的教大家使用按键精灵。 上网一族一般开机后会先看看自己邮箱,或者看看自己博客;每天如此,可能都有些烦了。现在好了,把这些繁杂的事情交给按键精灵吧。今天我们就来录制一个自动登录博客,并对整个页面进行浏览的脚本。 首先,我们打开“按键精灵”。其运行界面如下(图1): 图1 运行界面 打开软件后点击工具栏上“新建”项(如图2);之后进入“脚本编译器”界面(如图3)。

按键精灵命令

WQM按键精灵插件说明书 1.插件简介 WQM按键精灵插件作为按键精灵的一个插件,为按键精灵提供对WQM的全方位的控制功能,同时也能够提供对WQM中网页的全面控制功能。 2.插件功能说明 WQM插件提供三类控制命令:WQM全局控制命令、WQM浏览控制命令、页面控制命令,后台键盘鼠标命令,后台找色命令,全局控制命令,JS扩展命令 2.1.全局控制命令 1)Bind(WQM进程名) 功能:绑定最后一个正在运行的WQM进程,如果没有找到就启动一个WQM进程并绑定 参数:WQM进程名 返回值:进程ID 2)Tips(字符串) 功能:在托盘区显示一个气泡提示信息; 参数:提示信息; 返回值:无 3)SetSize(窗口宽度,窗口高度) 功能:将WQM窗口设置为指定大小; 参数: 参数1:窗口宽度; 参数2:窗口高度; 返回值:无 4)Save(网页地址,保存的文件路径) 功能:将指定url保存为文件; 参数: 参数1:需要保存的网页地址; 参数2:需要保存的文件路径; 返回值:无 2.2.浏览控制命令 1)Go(网页地址) 功能:当前标签页打开Url指定的网页;此操作是一个阻塞操作,如果网页没有打开,脚本不能继续执行。如果超过全局超时设定,将导致脚本中止; 参数: 参数1:需要打开的网页地址 参数2 布尔型:是否强制从服务器读取,默认为读取页面,可能读取本地缓存。 返回值:无 2)Back() 功能:当前标签的网页浏览向后退, 参数:无; 返回值:无 3)Forward()

功能:当前标签页前进; 参数:无; 返回值:无 4)Refresh(指定是否强制刷) 功能:刷新当前标签页 参数:参数1:指定是否强制刷新当前标签页,0表示正常刷新,1表示强制刷新返回值:无 5)TabNew () 功能:在WQM中新建一个标签页,并跳转到该标签页上; 参数:无 返回值:无 6)TabGoto(标签页) 功能:跳转到WQM中指定需要的标签页上 参数:整数类型; 返回值:无 7)TabClose() 功能:关闭当前标签页 参数:无 返回值:无 8)ScrollTo(水平滚动条位置,垂直滚动条位置) 功能:将当前网页滚动到指定位置; 参数: 参数1:水平滚动条位置; 参数2:垂直滚动条位置; 返回值:无 9)ClearHistory() 功能:清除浏览器的历史记录,无需跳出确认对话框; 参数:无 返回值:无 10)ClearTemp() 功能:清空IE临时文件 参数:无 返回值:无 11)ClearCookie() 功能:清除IE所有的Cookie 参数:无 返回值:无 12)GetUrl() 功能:返回当前页面的URL地址 参数:无 返回值:字符串,当前页面的URL地址 2.3.页面控制命令 1)HtmlClick(网页元素特征串) 功能:点击网页中的按钮或链接,或者是其他元素,无ID请指定tag;

生产系统建模与仿真课程设计

1. 设计分析 1.1问题描述 系统由四台加工中心、五个托盘和装夹工具、一套搬运轨道和小车、一个 工件装夹区组成,其布局如图1所示。系统所包含的主要时间类别及大致时间 如下: (1) 工件安装时间。是指待加工工件装夹并固定在托盘上的时间,由于模具工 件均为长方体,因此,该时间比较稳定,大约 2mi ns 左右。 (2) 小车等待时间。工件安装完成后,如机床都在工作状态,则小车需等待有 机床完成 工作后,开始运出待加工工件。该等待时间不是固定的值,需要计算 得出。 (3) 机床等待时间。当有多个机床处于空置状态时,由于运输容量的限制,有 的机床就 处于空置等待状态,该状态所经历的时间,就是该机床的等待时间。 (4) 工件运出时间。将已安装好工件的托盘,从安装区运出至数控设备。大约 2mi ns 。 (5) 更换托盘时间。将设备上装载已加工好的零件的托盘与小车上装载待加工 工件的托 盘进行更换。大约需要1min 。 (6) 工件运回时间。更换托盘后,将载有已加工好的工件的托盘运回安装区, 并卸载。 大约需要3mins 。 图1系统布局图 1.2设计内容 1任务队列如表1所示,计算该队列条件下的任务总完成时间、四台设备各自 的设备等待 搬运 轨道 小车

时间,绘制四台设备的工序图。 2对任务队列进行排序优化,阐述优化的思路和方法,计算优化后的任务总完成时间、四台设备各自的设备等待时间,绘制四台设备的工序图。 表1设计案例参数表(单位:分钟) 1.3设计中的主要因素及系统分析 在本次的设计条件中,系统中共有20个任务,每个任务的加工时间是不相等的,而且只有一套运输设备,各个设备的功能完全一致。所以制约的加工的最大因素便是运输的制约。按照原始的顺序,进行加工,画出原始工序图。 再对原始任务工序图进行分析,并数据计算。计算出20个任务的总加工时间, 各个设备的等待时间,小车的等待时间。分析我们所得的数据结果,找出制约整个工序的主要问题所在,并进行改善。 在这个系统中共有20个加工时间各不相同的任务,按照顺序移动的方式来进行加工。在分析之前我们需先进行以下假设: (1)加工开始前,五个托盘分别位于四台加工中心及装夹区; (2)小车运出至每台加工中心的时间相等,运回至每台加工中心的时间也 相等。 (3)系统运行中不会出现故障等影响加工时间的意外 (4)小车一次只能进行一次托盘更换,最多只能运回一个工件,也最多只能运出

相关主题
文本预览
相关文档 最新文档